freebsd-nq/etc/rc.d
Doug Barton 196b6a193e Overhaul the named boot script:
1. Remove a now-spurious NetBSD CVS Id, as we are no longer synching work
2. Remove a now-spurious BEFORE, since ntpdate now REQUIRE's named
3. Replace the call to set rcvar with what that function would output,
and generally reduce indirection ($name -> named) since it's highly
unlikely the name of the named process or service will change any time soon.
4. Resort the order the variables at the top of the file to a more
traditional format, and remove a spurious required_dirs from the top, as it
works better after load_rc_config.
5. We do not want the default reload method with named, so define a simple
but appropriate substitute using rndc. If I were writing this script for
the first time I would not include this at all, since it's preferable to
control a running daemon with rndc to start with, but given that this is
already here, let's do it right. I hope that future generations will
however resist the tempation to add reconfig to extra_commands.
6. By the same token, we want to use rndc to shut down named, but given
that by defining a stop function we lose the "find the process by its
pid file in an emergency" goodness of rc.subr, try to do something useful
in the event that rndc is not available, and keep the user informed.
7. Replace some "test -f" with "test -r" to handle the unlikely event
that the relevant file exists, but is unreadable.
8. Twiddle whitespace in a few areas, remove a spurious blank line,
a bogus double space, and try to do better indenting.
9. Improve generation of the rndc.key file significantly
a. If for some reason a user has an rndc.conf file, assume that they
did that on purpose, and hence know what they are doing, so leave them alone.
b. Introduce a named_uid configuration variable so that the user which owns
the rndc.key file and the user named runs as always match, and is more
easily configurable. This should dramatically reduce problems with rndc.
c. Also test that the rndc.key file size is greater than zero, rather than
simply that the file exists. I have seen at least one user report this exact
problem, and although neither of us is sure where the empty file came from,
the fix is simple, so include it.
d. Rather than try to create an rndc.key file in both /etc/namedb and the
chroot'ed /etc/namedb, assume that they are be the same (which they should
be), and only create the file in the chroot'ed version of the directory.
This partially addresses the problem described in conf/73929, but I have
not yet finished thinking about the PREFIX issue that PR also raises.

As a result of introducing the named_uid knob, the default named_flags
are now empty.

Update defaults/rc.conf and rc.conf(5) to reflect these changes.
2006-02-13 08:45:51 +00:00
..
abi As a quick fix disable the update of the linux ld.so.cache file, since 2006-01-24 18:58:48 +00:00
accounting Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
addswap Remove the module loading magic again; it's not needed after all. 2006-01-17 19:29:31 +00:00
adjkerntz Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
amd Remove superfluous line continuation backslash. 2005-12-30 08:57:33 +00:00
apm Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
apmd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
archdep Use hw.machine_arch instead of hw.machine. 2005-09-30 13:27:36 +00:00
atm1 Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
atm2 Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
atm3 Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
auditd Add auditd rc.d script. 2006-02-02 10:02:55 +00:00
bgfsck This depends on syslogd due to logger(1). 2005-07-22 00:57:37 +00:00
bluetooth Start integrating Bluetooth into rc.d system. 2005-11-10 19:09:22 +00:00
bootconf.sh Fix style bugs: 2002-10-12 10:31:31 +00:00
bootparams Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
bsnmpd Add startup script and default configuration file for bsnmpd. 2005-04-17 10:47:58 +00:00
ccd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
cleanvar Clear up problems with /etc/rc.d/{abi|cleanvar|cleartmp} brought 2005-12-19 10:57:00 +00:00
cleartmp Fix another braino, don't remove the X related socket directories 2005-12-27 23:22:18 +00:00
cron "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
DAEMON Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
devd Use ${name} in pathnames where appropriate. 2005-10-28 16:55:38 +00:00
devfs Allow the use of wildcarded device names in devfs.conf 2006-01-21 14:31:45 +00:00
dhclient Silence the de-bouncing of dhclient start up. The previous output 2005-07-26 00:37:19 +00:00
dmesg "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
dumpon Remove rcconf.sh from /etc/rc.d, and instead load the configuration 2005-12-10 20:21:46 +00:00
early.sh Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
encswap Teach rc.d/encswap script how to use geli(8) for swap encryption. 2005-08-05 23:38:51 +00:00
fsck Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ftpd Add an rc.d script for stand-alone ftpd. 2006-01-21 18:08:16 +00:00
gbde Move 'local_tr' function to rc.subr and change its name to 'ltr'. 2005-08-14 17:28:15 +00:00
geli Simplify the code a bit by using newly added (to kldstat(8) '-q') option. 2005-09-23 23:53:35 +00:00
geli2 Add scripts for GELI device configuration on boot. 2005-08-14 18:02:22 +00:00
hcsecd Remove not needed redirection of kldstat -q output to /dev/null. 2005-11-22 19:17:41 +00:00
hostapd - Add a startup script for hostapd. 2006-02-03 01:35:36 +00:00
hostname Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ike Don't be lazy, set the "command" variable even if 2005-10-23 14:06:53 +00:00
inetd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
initrandom Remove rcconf.sh from /etc/rc.d, and instead load the configuration 2005-12-10 20:21:46 +00:00
ip6addrctl Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ip6fw Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ipfilter `net.inet.ipf.fr_running' can be a negative value, which was introduced by 2005-07-07 05:59:44 +00:00
ipfs Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ipfw Transforming "ppp-user" into just "ppp", step 1: 2005-10-28 16:07:52 +00:00
ipmon Use ${name} in pathnames where appropriate. 2005-10-28 16:55:38 +00:00
ipnat Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ipsec The 'reload' command did the same as 'restart' command. 2006-01-24 15:16:55 +00:00
ipxrouted Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
isdnd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
jail Skip jails which are already running and inform why. 2005-08-07 23:19:02 +00:00
kadmind Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
kerberos Add a new rc.conf entry, kerberos5_server_flags, which allows the 2005-09-20 11:13:28 +00:00
keyserv Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
kldxref Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
kpasswdd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ldconfig Add a mechanism to include files added by ports which contain 2006-01-08 10:15:31 +00:00
local Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
localpkg Make localpkg print local scripts names when the boot is verbose 2006-02-12 10:04:56 +00:00
lockd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
LOGIN Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
lpd Allow chkprintcap(8) to be run before lpd is started. Disabled by 2005-03-02 02:46:47 +00:00
Makefile - Add a startup script for hostapd. 2006-02-03 01:35:36 +00:00
mixer Use of REQUIRE is better than BEFORE for most scripts, and very 2005-12-10 19:49:03 +00:00
motd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
mountcritlocal Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
mountcritremote 1. Add missing semicolon between "warn" and "return" to make sure 2005-12-30 09:16:23 +00:00
mountd In mountd_precmd(), use rc_args, not mountd_args to 2005-09-18 17:04:26 +00:00
moused "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
mroute6d Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
mrouted "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
msgs Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
named Overhaul the named boot script: 2006-02-13 08:45:51 +00:00
natd Automatically load the ipdivert module if it was not compiled into the kernel 2004-10-22 19:36:03 +00:00
netif Add a new configuration variable, ipv4_addrs_<ifn>, which adds one or 2005-11-14 23:34:50 +00:00
netoptions Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
network_ipv6 Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
NETWORKING Don't bogusly depend on dhclient. It's now run either by 2005-12-03 01:33:06 +00:00
newsyslog syslogd should REQUIRE newsyslog, rather than newsyslog using 2005-12-21 09:54:15 +00:00
nfsclient Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nfsd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nfslocking Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nfsserver Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nisdomain Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nsswitch Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ntpd Several users have commented (via filing PRs) that having ntp* depend 2005-12-21 09:48:41 +00:00
ntpdate REQUIRE named. On all systems I've examined running HEAD and 2006-01-16 06:03:42 +00:00
othermta Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
pccard Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
pcvt Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
pf Backout r1.11... 2005-11-10 10:40:15 +00:00
pflog pflog is a separate module now. 2006-02-05 22:38:08 +00:00
pfsync Add an rc.d script to start pfsync at the right moment of the 2005-10-02 18:59:02 +00:00
power_profile REQUIRE: syslogd and BEFORE: NETWORKING are now antithetical, 2005-12-21 01:19:20 +00:00
powerd Use ${name} in pathnames where appropriate. 2005-10-28 16:55:38 +00:00
ppp Use: 2005-10-28 16:10:56 +00:00
pppoed Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
pwcheck Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
quota Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ramdisk Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ramdisk-own Shutup debugging output. 2004-11-16 04:14:28 +00:00
random The alternative suggested for /entropy as a shutdown 2005-04-11 02:45:05 +00:00
rarpd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
resolv Remove rcconf.sh from /etc/rc.d, and instead load the configuration 2005-12-10 20:21:46 +00:00
root Tell nextboot to clean up after itself. 2006-01-18 04:53:48 +00:00
route6d Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
routed Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
routing Transforming "ppp-user" into just "ppp", step 1: 2005-10-28 16:07:52 +00:00
rpcbind Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
rtadvd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
rwho Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
savecore - use realpath /dev/dumpdev instead of just /dev/dumpdev so messages 2004-10-24 13:04:09 +00:00
sdpd Remove not needed redirection of kldstat -q output to /dev/null. 2005-11-22 19:17:41 +00:00
securelevel Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
sendmail Use ${name} in pathnames where appropriate. 2005-10-28 16:55:38 +00:00
serial Unify the ci/co variables now that the the tty drivers now use the same 2004-11-14 19:51:34 +00:00
SERVERS Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
sppp Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
sshd Don't be lazy, set the "command" variable even if 2005-10-23 14:06:53 +00:00
statd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
swap1 Stop method for swap1 script was introduced, because gmirror needed it. 2004-11-05 12:38:27 +00:00
syscons Remove usbd(8) and all references to it. It is no longer necessary 2005-12-15 01:04:51 +00:00
sysctl Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
syslogd syslogd should REQUIRE newsyslog, rather than newsyslog using 2005-12-21 09:54:15 +00:00
timed Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
tmp Brooks pointed out a case where tmp needs to be run after 2005-12-02 20:35:23 +00:00
ugidfw o Remove unfinished code and make it possible to override 2005-10-02 07:03:00 +00:00
var Remove stray else. 2005-03-02 16:41:35 +00:00
virecover Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
watchdogd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
wpa_supplicant wpa_supplicant(8) requires -D option for ndis(4) now. 2005-10-19 22:26:47 +00:00
ypbind Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
yppasswdd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ypserv Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ypset Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ypupdated Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ypxfrd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00