Commit Graph

225 Commits

Author SHA1 Message Date
Giorgos Keramidas
6e1b2264bd Introduce root_rw_mount as a new variable in defaults/rc.conf to
unbreak /etc/rc.d/root for diskless systems that get their root
filesystem from a read-only NFS mount.

PR:		conf/72927
Submitted by:	Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
Reviewed by:	brooks
2004-10-20 16:58:28 +00:00
Ruslan Ermilov
a21137f7ad Accidentally removed the last component of the pathname when committing. 2004-10-13 07:12:14 +00:00
Ruslan Ermilov
b8c7ee4701 Fix a botched rev. 1.221 commit. Also, a number of people have
pointed out that /usr/local/etc/rc.d/000.pkgtools.sh installed
with the portupgrade does an equivalent thing, so I personally
would like to see the change reverted, but let David handle it.
2004-10-13 07:00:21 +00:00
Dag-Erling Smørgrav
b63c18f291 Remove hcsecd line which was inadvertantly included in the previous commit. 2004-10-12 18:45:15 +00:00
Dag-Erling Smørgrav
1ffa2a0a7c Remove a pointless syslogd_flags example.
MFC after:	2 weeks
2004-10-12 18:36:32 +00:00
David E. O'Brien
5d79fb92c2 'portupgrade' places obsoleted shared libraries in /usr/local/lib/compat/pkg,
so add this the list of directories ldconfig'ed.
2004-10-11 22:37:34 +00:00
Tom Rhodes
cd22091d46 Correct a trivial typo. 2004-09-29 07:07:43 +00:00
Tom Rhodes
b507bda539 Give users the ability to load a mac_bsdextended(4) ruleset on boot (defaults
to NO of course).  Provide a basic ruleset file, rc.bsdextended, but allow
the filename to be overridden through rc.conf.

Discussed with:	rwatson (awhile ago)
2004-09-29 00:12:28 +00:00
Doug Barton
8f1bb3891d Create a named chroot directory structure in /var/named, and use it
by default when named is enabled. Also, improve our default directory
layout by creating /var/named/etc/namedb/{master|slave} directories,
and use the former for the generated localhost* files.

Rather than using pax to copy device entries, mount devfs in the
chroot directory.

There may be some corner cases where things need to be adjusted,
but overall this structure has been well tested on a production
network, and should serve the needs of the vast majority of users.

UPDATING has instructions on how to do the conversion for those
with existing configurations.
2004-09-28 09:46:00 +00:00
Doug Barton
511c05b377 For the default FreeBSD install, the file path actually is
/var/run/named/pid. This is done so that named can start
with -u bind and still dump a pid file in that directory,
which is chowned to user bind.
2004-09-24 22:47:10 +00:00
Dag-Erling Smørgrav
8540155e95 It's named.pid, not named/pid.
Pointy hat to:	dougb@
2004-09-24 19:46:18 +00:00
Doug Barton
7295f657e2 Add a note to indicate that the path set in named_pidfile must
also be set in named.conf. Our default named.conf has this already.

Update the note for named_symlink_enable to indicate that ndc is gone.
2004-09-24 04:45:16 +00:00
Sean Chittenden
6e03664cc4 Bring back etc/rc.d/ntpdate as requested by scads of people. This isn't a
complete backout as the ntpd_sync_on_start etc/rc.conf tunable is still
present, though the default is now NO (was YES).  Since we're no longer
syncing time at startup by default when ntpd is enabled (as was the case
24hrs ago), remove UPDATING entry pointing out that ntpd(1) -g is slower
than ntpdate(1).

Hopefully ntpd_sync_on_start="YES" can be made the default for -CURRENT
after 5.3 is cut.  At the very least, this should be set to YES when a
user requests to have ntpd enabled via sysinstall(1).

Requested by:	many
2004-09-15 01:08:33 +00:00
Sean Chittenden
0050f9ec3c Stop using ntpdate(1) in our startup proceedure. Replace ntpdate(1) with
calls to ntpd -g.  ntpd is noticably slower than ntpdate, but is also more
accurate.  This removes the nasty hackery in rc.d/ntpdate that would parse
out ntp servers from /etc/ntp.conf (ntpd knows how to read its own config
file).  By default, ntpd *will* sync with its listed time servers.  To
turn this off so that ntpd does not sync, ntpd_sync_on_start="NO" can be
added to /etc/rc.conf.  If ntpd is not enabled (the default), then time is
not synced on startup.  ntpdate's use has been depreciated by the ntpd
authors for quite some time so this change shouldn't be unexpected.

Suggested by:	des
Approved by:	roberto (resident ntp guru)
2004-09-14 03:01:38 +00:00
Max Laier
a31f99f887 Fix typo in description of pflog_logfile.
Submitted by:	Mike Jakubik
2004-07-27 00:28:16 +00:00
Simon L. B. Nielsen
64785dbd46 For the gbde attach script:
- Ask the user up to X times (3 by default) for the pass-phrase, if
  it is incorrect the first time.
- Add support for storing the lockfiles in another other directory
  than /etc.
- Document that it is possible to override the location of each single
  lockfile.

Approved by:	pjd
2004-07-18 18:01:48 +00:00
Warner Losh
d8dbb9937b devd is now on by default
Reviewed by: dfr,njr (not nate!)
2004-06-30 15:58:46 +00:00
Brian Feldman
d5ed4f061e Allow setting the system console keyboard via the ${keyboard} rc.conf
directive.
2004-06-18 20:09:30 +00:00
Hajimu UMEMOTO
389faa192d fix typo in comment in my previous commit. 2004-06-02 09:58:18 +00:00
Hajimu UMEMOTO
b351b78a10 Add ip6addrctl_enable and ip6_addrctl_verbose option. If
ip6addrctl_enable is set to YES, address selection policy is installed
into kernel.
If there is /etc/ip6addrctl.conf, it is used for address selection
policy.  Even if there is no /etc/ip6addrctl.conf, we install default
policy.  In this case, if ipv6_enable is set to YES, we use address
selection policy described in RFC 3484 as default.  Otherwise, we
install priority policy for IPv4 address.
The default of ip6addrctl_enable is NO for now.  However, it may
better to enable it by default.
2004-06-02 09:39:49 +00:00
Nate Lawson
e6228fcfdc Throw the switch and enable use of the lowest idle states while online in
addition to offline.  This can be overridden in /etc/rc.conf if it causes
trouble although this has been stable since 2003/12.
2004-05-29 04:52:37 +00:00
Brian Feldman
87bd2f457b Document devfs_set_rulesets a little. 2004-04-10 22:13:27 +00:00
Max Khon
934c5da9c4 Document sendmail_pidfile variable.
Add sendmail_procname variable.
2004-04-05 16:22:14 +00:00
Max Laier
6cd9ebedd7 Add rc.d script to start pflogd and add rcvars etc. Also document vars in
rc.conf(5) and put a sample entry to newsyslog.conf

Reviewed by:	-current
Approved by:	bms(mentor)
2004-04-02 19:25:27 +00:00
Brooks Davis
3e091039ee Overhaul the /etc/rc.d/diskless script by splitting it out into
hostname, resolve, tmp, and var scripts.  The latter three are new and
were repo copied.  These scripts no longer depend on being booted with
and NFS root instead attempt to automaticly create mfs /tmp and /var
volumes if the they are not writable.  This behavior can be overridden
in /etc/rc.conf.

Reviewed by:    luigi, pjd
2004-03-23 23:22:35 +00:00
Max Laier
1f4408f321 Add rc.d script for pf(4) (more to come once pflogd(8) works as well).
Update defaults and write some lines for rc.conf(5) also.
Mostly dup'ed from ipf

Reviewed by:	-current
Approved by:	bms(mentor)
2004-03-23 22:30:15 +00:00
Doug Barton
0a54defb08 1. Remove the named_rcng variable. Mike's caution in this area was a good
thing, but we're ready to move on.

2. Remove the -g default argument in named_flags. It doesn't actually do
what most users think it does, and what most users want it to do is already
accomplished with a proper default group for the bind user, which we have.
Also, the -g knob does something entirely different in BIND 9, which leads
to a lot of needless confusion/aggravation.

3. In the rc.d script, don't bogusly override $command, or $rc_flags. Both
are adequately handled in rc.conf[.local].

4. DO properly override $rc_flags if user has named_chrootdir set.
This may need to be revisited, but should be ok for now.

5. Protect all chrootdir-related bits under that variable, instead of
named_rcng.

There is more work to be done here, especially in the area of BIND 9
compatibility, but this is a start at least.

Prompted in part by (legitmate) grousing from: kuriyama, Randy Bush
2004-03-14 19:10:06 +00:00
Mike Makonnen
30c360afba From the PR:
Certain MTA configurations mean that the notifications from
	virecover keep bouncing; so here's a patch to allow administrators
	to turn them off.

PR:		conf/54910
Submitted by:	bms (with a minor cleanup)
2004-03-03 15:21:01 +00:00
Dag-Erling Smørgrav
607b5a9109 Add support for initializing swap devices with random one-shot keys. Note
that the keys are currently generated by computing the MD5 checksum of 512
bytes read from /dev/random, and are passed to gbde on the command line.

Sponsored by:	Teleplan AS
2004-02-03 11:26:08 +00:00
Mike Makonnen
cc93dd4b73 Ruleset numbers are not allowed in devfs_* knobs.
Noticed by someone on -current.
2004-02-02 13:27:41 +00:00
Mike Makonnen
5d2885f928 Support starting/stoping of jails individually.
This commit also removes the support for the sysutils/jailer port. This
is inline with the general policy to keep ports related knobs out
of the base system's configuration mechanism.

Submitted by: Juergen Unger <j.unger@addict.de>
2004-02-02 13:25:28 +00:00
Sergey Babkin
dfa244fc22 Added support for intelligent handling of DST transitions in cron.
reviewed by: imp
2003-12-25 23:29:19 +00:00
Nate Lawson
3662033599 Add power_profile, a script that changes the ACPI CPU Cx idle state and/or
the throttling state in response to line transitions.  Future plans
include adding support for CPU frequency changes.

Add a devd.conf entry for calling this script.

The default values for this are:
performance_cx_lowest="HIGH"       # Use HLT (C0) online
performance_throttle_state="HIGH"  # 100% (no throttling)
economy_cx_lowest="LOW"            # Use the lowest Cx state possible
economy_throttle_state="HIGH"      # 100% (no throttling)
2003-12-18 04:39:57 +00:00
Sean Chittenden
12335de1f5 Backout ataraid rcng script. I must have missed ar0 in my scan of /dev
after my first reboot because sure enough, I'm seeing it there now and
ata(4) is doing the right thing(TM).

Pointed out by:	des
2003-12-14 13:36:36 +00:00
Sean Chittenden
7e6b2a1467 Add a script that allows software RAID sets to be created before file
systems are mounted.  An example set of entries for /etc/rc.conf:

ataraid_enable="YES"
ataraid_devices="ar0"
ataraid_ar0_set="ad2 ad3"
ataraid_ar0_type="RAID1"

Because there is no "correct" way of doing ATA raid (ie, geom vs.
atacontrol vs. vinum) that is bikeshed proof, this rcng script stays within
the bounds of atacontrol and assumes that other RAID solutions for GEOM or
vinum will end up in a different rcNG script.

Reviewed by:	green
2003-12-14 09:42:02 +00:00
Bruce M Simpson
a2ed0b4e3d Add a means of starting an IKE daemon from the rc system at an appropriate
time during the boot process. This is needed in the case where NFS mounts
from servers reachable only via IPSEC are in /etc/fstab.

PR:		conf/42497
Submitted by:	Volker Stolz
Approved by:	re (rwatson)
2003-11-28 17:28:42 +00:00
Poul-Henning Kamp
77e8ad5714 Default ntpd to write a "driftfile" in /var/db/ntpd.drift.
A "driftfile" caches the oscillator offset estimate from boot to boot,
having this means faster and less bumpy time synchronization.  Will
be overridden by any value in the config file.
2003-10-03 21:33:40 +00:00
Doug Barton
ea39e8caa9 Add a default setting of NO for the gbde auto attach script, and
document the options.
2003-09-18 09:59:37 +00:00
Jacques Vidrine
6d3001ca94 Add `-C 60' to the default flags for inetd, so that it is less
vulnerable to run-of-the-mill DoS attacks in the default installation.
2003-09-15 16:44:24 +00:00
Mike Makonnen
66338db9e9 Enhance the jail start/stop script.
o The following additional configuration attributes of a jail can be
  controlled from rc.conf:
	- mounting devfs(5)
	- mounting fdescfs(5)
	- mounting procfs(5)
	- custom devfs(8) ruleset
	  If no ruleset is specified, the default jail ruleset is used.

o The output of executing /etc/rc in the jail is now redirected
  to /dev/null. Instead, the hostname of the jail is echoed if
  the jail(8) command exited successfully. If the output is wanted
  it can probably be redirected to a file (/var/run/$jail maybe)
  instead of /dev/null.

Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
		with modifications by Jens Rehsack <rehsack@liwing.de>
		and me.
2003-08-24 06:29:32 +00:00
Mike Makonnen
4541e3ecc6 o Reduce rc(8) startup clutter by turning the informational messages
off by default.
o Apparently the routine displaying the informational messages wasn't
  checking its knob in rc.conf, so fix that as well.

Requested by:	obrien
2003-08-20 06:50:34 +00:00
Mike Makonnen
130112f793 Add a general mechanism for creating and applying
devfs(8) rules in rc(8). It is most useful for applying
rules to devfs(5) mount points in /dev or inside jails.
The following line of script is sufficient to
mount a relatively useful+secure devfs(5) in a jail:

	devfs_mount_jail /some/jail/dev

Some new shell routines available to scripts that source
rc.subr(5):
	o devfs_link		- Makes it a little easier to create symlinks
	o devfs_init_rulesets	- Create devfs(8) rulesets from devfs.rules
	o devfs_set_ruleset	- Set a ruleset to a devfs(5) mount
	o devfs_apply_ruleset	- Apply a ruleset to a devfs(5) mount
	o devfs_domount		- Mount devfs(5) and apply some ruleset
	o devfs_mount_jail	- Mount devfs(5) and apply a ruleset
				  appropriate to jails.

Additional rulesets can be specified in /etc/devfs.rules.
If the devfs_system_ruleset variable is defined in rc.conf
and it contains the name of a ruleset defined in /etc/defaults/devfs.rules
or user supplied rulesets in /etc/devfs.rules then that ruleset will
be applied to /dev at startup by the /etc/rc.d/devfs script. It can
also be applied post-startup:

	/etc/rc.d/devfs start

This is a more flexible mechanism than the previous method of using
/etc/devfs.conf. However, that method is still available.

Note: since devfs(8) doesn't provide any way for creating symlinks
as part of a ruleset, anyone wishing to create symlinks in a devfs(5)
as part of the bootup sequence will still have to rely on /etc/devfs.conf.
2003-08-20 06:15:18 +00:00
Hartmut Brandt
8b296e19bd Now that routes for IP over ATM may look much more complex than before,
use the atmconfig(8) utility instead of route(8) to install those routes.
For this we need a new rc.conf variable natm_static_routes that works
just like static_routes except that the referenced routes use the syntax
of atmconfig(8).

Okay'ed by:	mtm
2003-08-14 15:27:32 +00:00
Hajimu UMEMOTO
c8d9e00aca add rtsol_flags.
MFC after:	1 week
2003-08-08 17:43:58 +00:00
Martin Blapp
70374dff23 Change the default for background_dhclient back to NO. It can
cause to much troubles with applications.
2003-07-28 13:09:00 +00:00
Martin Blapp
0888a8766e Always start dhclient in the background.
Reviewed by:	mtm
2003-07-28 08:15:52 +00:00
Sean Kelly
370c3cb57c - Add a software watchdog facility.
This commit has two pieces. One half is the watchdog kernel code which lives
primarily in hardclock() in sys/kern/kern_clock.c. The other half is a userland
daemon which, when run, will keep the watchdog from firing while the userland
is intact and functioning.

Approved by:	jeff (mentor)
2003-06-26 09:50:52 +00:00
Mike Makonnen
9ed30b5853 Update a comment about symlinking named's pid file to correctly
reflect the code.

Suggested by:	maxim
2003-06-14 22:26:30 +00:00
Mike Makonnen
d679c13014 The dhcp_program and dhcp_flags variables have to be renamed to
take advantage of the rc.subr(8) glue. They are renamed dhclient_program
and dhclient_flags.
	o Rename them in rc.conf(5)
	o Rename them in /etc/defaults/rc.conf
	o Add the deprecated variables to /etc/rc.subr
	o Isolate the use  of the 'command' variable to the
	  NetBSD specific parts in /etc/rc.d/dhclient.
	o Now that dhcp_flags has also been renamed it will
	  be applied properly by rc.subr(8) glue code.

Reported by:	John Nielsen <john@jnielsen.net>
2003-06-07 10:31:17 +00:00
Gordon Tetlow
25c01919eb Move networkfs_types from mountcritlocal into defaults/rc.conf as netfs_types.
Also add logic into mountcritremote to add extra_netfs_types to the list.

This unbreaks putting smbfs, portalfs and now nwfs in fstab.
2003-06-01 01:43:37 +00:00