Commit Graph

10581 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
a80d5fc227 Use pidfile(3) in moused(8). 2005-08-24 17:27:06 +00:00
Pawel Jakub Dawidek
fa39391686 Use pidfile(3) in syslogd(8). 2005-08-24 17:26:26 +00:00
Pawel Jakub Dawidek
c6262cb601 Teach daemon(8) how to use pidfile(3). 2005-08-24 17:24:39 +00:00
Bruno Ducrot
7065e0e9f4 Change the default adaptive algorithm for phk's one. Thanks to phk
and Kevin Oberman for this work.

Submitted by:	Kevin Oberman
Reviewed by:	njl
Approved by:	njl
2005-08-24 07:52:59 +00:00
Craig Rodrigues
91d7f332e0 - Remove NTP servers which do not resolve in DNS.
- Use pool.ntp.org servers where possible, thanks to
  Chuck Swiger <cswiger at mac dot com> .
- Update list of Swedish NTP servers, thanks to
  Fredrik Lindberg <fli+freebsd-current at shapeshifter dot se> .

PR:		bin/75479
MFC after:	1 day
2005-08-24 02:21:12 +00:00
Brian Somers
34c22943ec Spell powersavesleep correctly. 2005-08-22 09:59:13 +00:00
Pawel Jakub Dawidek
3a6b8b21d2 Sync code with the error report: calloc(number, 1) is equivalent to
malloc(number).
2005-08-19 11:03:49 +00:00
Dag-Erling Smørgrav
7df76a1312 Use larger buffers to read lines from the vendor list.
Trim trailing whitespace and comments before parsing, and skip empty lines.
Skip subvendor / subdevice entries (which start with two tab characters).
Change the scanf() format string to match any amount and type of whitespace
between the device ID and the description text.

MFC after:	3 weeks
2005-08-18 11:11:40 +00:00
Dag-Erling Smørgrav
5eaf9703df Whitespace cleanup. 2005-08-18 11:04:49 +00:00
Gregory Neil Shapiro
7d0ac6f3a2 Make links for hoststat(8) and purgestat(8) man pages.
PR:		docs/85009
MFC after:	3 days
2005-08-17 02:36:31 +00:00
Colin Percival
398b037d7d Change the default partition sizing code in order to
1. Provide larger /, /var, and /tmp partitions (the last increase was
in 2001, and we now have both larger hard drives and more space-hungry
software.)
2. If there is enough space available, allocate extra space to /var
sufficient to store a crash dump.

On systems where harddrivesize > 3 * RAMsize + 10GB, the default sizes
will now be as follows:
swap	RAMsize * 2
/ 	512 MB
/tmp	512 MB
/var	1024 MB + RAMsize
/usr	the rest (8GB or more)

On systems where harddrivesize > RAMsize / 8 + 2 GB, the default sizes
will be in the following ranges, with space allocated proportionally:
swap	RAMsize / 8 -- RAMsize * 2
/	256 MB	    -- 512 MB
/tmp	128 MB      -- 512 MB
/var	128 MB      -- 1024 MB
/usr	1536 MB     -- 8192 MB

On systems with even less disk space, the existing behaviour is not
changed.

Approved by:	re (kensmith)
MFC after:	1 day
		(or once people stop arguing about colours of paint)
2005-08-16 13:19:17 +00:00
Pawel Jakub Dawidek
8bd435d9cf Not sure why, but SYSCTL_OUT() can sometimes keep returning ENOMEM
in sysctl_jail_list(). Because of this, jls(8) could enter into
an endless loop. The strange thing is, that we can call jls(8) while
the other one is in loop and it will succeed - SYSCTL_OUT() will
not return ENOMEM there.

Maybe SYSCTL_OUT() returns first ENOMEM, because there is no memory,
but is marking some memory range as wired even on failure and another
SYSCTL_OUT() calls are not going to succeed, because process exceeds
limit of wired memory? ENOVMCLUE.

Anyway. Fix jls(8) to ignore ENOMEM and retry only 4 times.

Submitted by:	Niklas Saers
PR:		kern/79245
MFC after:	3 days
2005-08-15 12:15:21 +00:00
Colin Percival
24a3ff142f Spell "cmp > /dev/null" as "cmp -s".
Suggested by:	dougb
2005-08-14 02:45:04 +00:00
Colin Percival
723c596167 Correctly exit from extract_run() and update_run() if files needed are
missing from ${WORKDIR}/files/.

This bug was caused by the astonishing interaction of "return" and
pipelines; in the following code, the "return" does not exit the
function, but instead exits the subshell which was spawned for the last
element of the pipeline; consequently, the output produced is "foo".

foo() {
	echo bar | while read baz; do
		if [ ${baz} = "bar" ]; then
			return 1
		fi
	done

	echo foo
}

Reported by:	simon
2005-08-13 21:28:43 +00:00
Simon L. B. Nielsen
d24cff0fb0 Misc mdoc(7) fixes:
- Bump document date for recent updates.
- Use .Fx for FreeBSD.
- Remove EOL whitespace.
- Start new sentences on new lines.

Reviewed by:	cperciva
2005-08-13 19:08:10 +00:00
Colin Percival
d958d0d5dc Allow multiple commands to be specified on a single command line, e.g.,
"portsnap fetch update" or "portsnap -I cron update".  They will be
executed in the order that they appear, and duplicates are not removed
(so "portsnap fetch fetch fetch fetch" is meaningful, albeit rather
silly).

Requested by:	Roman Divacky
2005-08-13 16:27:13 +00:00
Colin Percival
a9b7d0260b Fix the progress statistics code by printing the right variable. I
missed this when I changed the stats code in the ports -> base
transition.

Pointed out by:	simon
2005-08-13 11:55:29 +00:00
Sam Leffler
9c1909fe22 save+restore wpa, privacy, and roaming settings
MFC after:	2 weeks
2005-08-13 04:23:33 +00:00
Colin Percival
1c1667f893 When using cmp(1) to determine if the ports tree is already up to date,
we want the exit code, but not the actual output; add a redirect to
/dev/null.

Pointy hat to:	cperciva
2005-08-12 04:35:27 +00:00
Brian Somers
6e03259288 If we fail in chown(2), try to just change the group and continue on to
change the permissions.  Failures are still recorded.

This allows mtree to do a generally better job of things when uid != 0.

Sponsored by:		ActiveState/Sophos
Partially submitted by:	neilw at ActiveState dot com
Reviewed by:		neilw at ActiveState dot com
MFC after:		3 weeks
2005-08-11 15:43:55 +00:00
David E. O'Brien
216a5fbf37 Put rev. 1.65 into usage(). 2005-08-11 15:23:23 +00:00
Colin Percival
8573cb38b6 If the ports tree is already up to date when we run portsnap update,
exit early; this avoids spending five seconds rebuilding the INDEX
files.

Requested by:	somebody on IRC, but I can't remember who
2005-08-11 13:48:13 +00:00
Hajimu UMEMOTO
9cc94db2fe fix typo.
Submitted by:	suz
Obtained from:	KAME
2005-08-10 17:09:08 +00:00
Colin Percival
9de71e6fdd Remove unused variable.
Reported by:	stefanf
2005-08-10 13:45:00 +00:00
David E. O'Brien
71d8a448ac Add an option to tell what version of config(8) this is. 2005-08-10 06:36:44 +00:00
Colin Percival
4c3cffeb64 Check that malloc() succeeds in makelist.
Submitted by:	Roman Divacky (who did a very complete review of both
				make_index.c and phttpget.c)
2005-08-09 09:49:01 +00:00
Colin Percival
3ad7e67045 Replace INT_MAX with OFF_MAX. I used INT_MAX originally (in ports)
because OFF_MAX wasn't defined on FreeBSD 4.x.
2005-08-09 08:33:27 +00:00
Colin Percival
f79293da85 When parsing the HTTP_PROXY environment variable, strip a trailing /
from the port number (if any exists).  This unbreaks
env HTTP_PROXY="http://localhost:3128/" portsnap fetch

While I'm here, list both the host and the port in the error message
output if getaddrinfo() fails, since either of them could be responsible
for the failure.
2005-08-09 03:32:29 +00:00
Colin Percival
d4308f6468 Add a missing EOL when printing "Latest snapshot on server is older
than what we already have" message. [1]

When operating with the undocumented --debug option, replace "xargs
phttpget" with "xargs -t phttpget", since that might conceivably help
debugging.

Noticed by:	simon [1]
2005-08-09 02:50:14 +00:00
Colin Percival
6fb01948ee Add portsnap to the base system. This is a secure, easy to use,
fast, lightweight, and generally good way for users to keep their
ports trees up to date.

This is version 0.9.4 from the ports tree (sysutils/portsnap) with
the following changes:
1. The experimental pipelined http code is enabled.  No seatbelts
in -CURRENT. (^_^)
2. The working directory has moved from /usr/local/portsnap to
/var/db/portsnap (as discussed on -arch two days ago).
3. Portsnap now fetches a list of mirrors (distributed as DNS SRV
records) and selects one randomly.  This should help to avoid the
uneven loading which plagues the cvsup mirror network.
4. The license is now 2-clause BSD instead of 3-clause BSD.
5. Various incidental changes to make portsnap fit into the base
system's build mechanics.

X-MFC-After:    6.0-RELEASE
X-MFC-Before:   5.5-RELEASE
X-MFC-To:       RELENG_6, RELENG_5, ports
discussed on:   -arch and several other places
"yes please" from:      simon, remko, flz, Diane Bruce
thinks this is a great idea:    bsdimp
Hopes he didn't forget any files:       cperciva
2005-08-08 20:10:06 +00:00
Christian Brueffer
23fe4fa258 Add some more info about jail startup and shutdown.
Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
MFC after:	3 days
2005-08-07 20:53:29 +00:00
Poul-Henning Kamp
0c8eca7560 Respect the YES_HESIOD build variable 2005-08-06 16:52:30 +00:00
Ken Smith
d44cf58f45 The /stand directory now disappears out from under sysinstall while
it is running during installations.  The vsystem() function does get
used after this happens (e.g. if you manually configure the network
interface and ask it to enable the interface) so it needs to be a
little smarter about whether it uses /stand/sh or /bin/sh.

MFC after:	3 days
2005-08-05 13:39:08 +00:00
Stefan Farfeleder
150a210073 Declare iftraceinit() at file scope. 2005-08-05 07:17:23 +00:00
Ollivier Robert
6553069018 The check for invalid characters introduced in 1.9 incorrectly
flags NIS entries as invalid.

MFC6 candidate

Submitted by:	Bob Willcox <bob@immure.com>
PR:		bin/82325 (but I used the patch from Bob).
2005-08-04 12:44:36 +00:00
Joseph Koshy
38fc5f3489 Correctly print system-wide PMC counts for short-lived command lines.
Reported by:	cracauer
MFC after:	3 days
2005-08-04 03:12:55 +00:00
Poul-Henning Kamp
4b0a1b8b17 Add NO_PCVT 2005-08-03 09:27:26 +00:00
Sean Chittenden
71997d4be4 Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8). 2005-08-02 21:38:03 +00:00
Christian Brueffer
48193882ad Mention the default value of PATH and that it may be overridden.
Submitted by:	Roman Divacky
MFC after:	3 days
2005-07-31 13:41:23 +00:00
Pawel Jakub Dawidek
49630c2335 Change /home symbolic link, so it will point to usr/home instead of /usr/home.
Previous symlink was confusing:

	# cd /jails/virtual_system_1/home
	# realpath .
	/usr/home

...and slower.

OK'ed by:	rwatson, phk
2005-07-31 08:25:53 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Sam Leffler
e45a56744b Correct problems with handling interfaces that go away (e.g. when
a card is ejected).  wpa_supplicant requires that internal events
for interfaces coming+going include a name but after an interface
is removed you cannot use if_indextoname to map the interface index
in the RTM_IFINFO (or RTM_IFANNOUNCE) msg to an interface name.
Instead record the interface index in the driver-private data area
and use that to filter msgs from the routing socket.  This insures
that when we have a message to process we know the interface name.
The end result is that we can now dispatch an "interface removed"
event that is understood when notified than an interface went away
(where previously the event dispatched was ignored because the
interface name was unrecognized).

This change also insures we only process events for our interface.

The only downside is that we can no longer wait for an interface
to arrive as we need to map the interface name to an index at
startup.  This is not important as wpa_supplicant should be launched
by devd and not include a separate mechanism for doing interface
discovery.

MFC after:	3 days
2005-07-29 05:57:28 +00:00
Sam Leffler
9bd22fb964 clear eloop registration when deinit'd the l2 packet support
MFC after:	3 days
2005-07-29 05:48:00 +00:00
Nate Lawson
0af442fbcf Correct column alignment. 2005-07-28 19:41:52 +00:00
Nate Lawson
7a20dc58a8 Fix nits in reporting battery information and add battery status reporting.
Rate units are mA/mW, not mAh/mWh.  Get full battery status and time
remaining from ACPIIO_BATT_GET_BATTINFO instead of BST.

PR:		bin/83672
MFC after:	2 days
2005-07-28 19:31:28 +00:00
Kirill Ponomarev
cf53630f66 Add -o/-O options to pkg_version:
-o  Show the origin recorded on package generation instead of the
       package name.

   -O  Only list packages whose registered origin is origin.

Based on PR:	bin/78640
Submitted by:	Marcus Grando <marcus at corp dot grupos.com.br>, flz
2005-07-27 07:55:12 +00:00
Nate Lawson
c996f586de powerd(8) requires root permissions to run so notify the user if they
try to start it without this.

Submitted by:	Philip S. Schulz
MFC after:	2 days
2005-07-25 16:43:12 +00:00
Tilman Keskinoz
11af798cf0 Move DNS configuration before sendmail configuration, because
newaliases(1) may hang without proper DNS configuration.

Approved by:	brueffer
2005-07-25 16:04:30 +00:00
Dag-Erling Smørgrav
c9275efacc Disable thread support in BIND. It appears to reduce performance rather
than increase it, and seems to be the cause of the memory leaks which some
users have reported.

Requested by:	dougb
MFC after:	5 days
2005-07-25 14:44:11 +00:00
Doug Barton
a2412a091e (More thoroughly) fix the problem with the EGREP lines that was reported
on -current by Ben Kaduk <minimarmot@gmail.com>.

Add a hack of my own to allow the user to supply the paths to the INF and
SYS files on the command line.
2005-07-23 18:47:18 +00:00