freebsd-dev/etc/rc.d
Doug Barton 3c9471138e 1. Determine the location of the rndc* binaries relative to $command
so that when using named from the ports (or elsewhere) the proper rndc*
commands will be run.

2. Rework the stop routine using ideas from brooks and delphij.
Specifically I am duplicating a lot of code from rc.subr's stop routine
so that this one will behave more like the one in rc.subr, but use rndc
to kill the daemon (or regular kill if that fails). This also avoids
the problems related to using killall if rndc fails, which is bad if
you're running more than one named on the same box.

3. Take a concept from gshapiro and allow the rndc.key file to be
owned by root OR the named_uid user.

Although I used different solutions, this commit handles issues raised in:
PR:	conf/73929
PR:	conf/103976
PR:	conf/109409
2007-10-22 09:38:44 +00:00
..
abi Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
accounting Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
addswap Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
adjkerntz Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
amd The amd_map_program knob can potentially contain a command whose output 2007-10-19 22:55:42 +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 $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
atm1 Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +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 Sleep for one second after calling audit -t to give the audit daemon a 2006-09-24 17:31:04 +00:00
auto_linklocal Add "nojail" keyword to prevent spurious error messages. 2006-12-29 15:56:21 +00:00
bgfsck Allow background_fsck_delay to be set to a negative value which delays 2007-03-11 06:53:07 +00:00
bluetooth Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
bootconf.sh Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
bootparams Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
bridge Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
bsnmpd Add startup script and default configuration file for bsnmpd. 2005-04-17 10:47:58 +00:00
bthidd Add bthidd(8) rc(8) script 2006-09-07 22:25:08 +00:00
ccd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
cleanvar Remove two superfluous trailing semicolons. 2007-05-24 05:58:20 +00:00
cleartmp Improve cleartmp in a number of aspects: 2006-10-16 13:01:45 +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 network_ipv6 also does some interface configuration so require it to run 2006-09-21 14:29:32 +00:00
devfs Allow the use of wildcarded device names in devfs.conf 2006-01-21 14:31:45 +00:00
dhclient Having gone to the trouble of setting up a variable, we should use it. 2007-03-25 19:45:20 +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 Deprecate use of the early.sh script as advertised when the support for 2007-10-09 07:30:14 +00:00
encswap Teach rc.d/encswap script how to use geli(8) for swap encryption. 2005-08-05 23:38:51 +00:00
FILESYSTEMS Add zfs to REQUIRE. 2007-04-09 08:44:50 +00:00
fsck o Implement the stop_boot subroutine [1]. This subroutine can be used by 2007-05-18 12:04:41 +00:00
ftp-proxy Add a startup script for ftp-proxy(8) now that it is no longer started as 2007-09-06 21:00:48 +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 Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
geli2 Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
hcsecd Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
hostapd - Add a startup script for hostapd. 2006-02-03 01:35:36 +00:00
hostid backout filter of Nil UUID as the boot loader code already filters out Nil UUIDs (see src/sys/boot/i386/libi386/smbios.c:smbios_setuuid for details) 2007-05-22 13:53:59 +00:00
hostname Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
idmapd RC script for idmapd(8), defaulting to off. 2006-10-15 14:19:06 +00:00
inetd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
initrandom Remove two superfluous trailing semicolons. 2007-05-24 05:58:20 +00:00
ip6addrctl Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
ip6fw Instead of directly sourcing the firewall script, run it in a separate shell. 2007-04-02 15:38:53 +00:00
ipfilter FILESYSTEMS requires root, so requiring both of them is redundant. 2007-04-09 08:53:40 +00:00
ipfs Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ipfw Instead of directly sourcing the firewall script, run it in a separate shell. 2007-04-02 15:38:53 +00:00
ipmon Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
ipnat Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
ipsec o Implement the stop_boot subroutine [1]. This subroutine can be used by 2007-05-18 12:04:41 +00:00
ipxrouted Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
isdnd Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
jail Fix indentation. 2007-05-24 06:01:06 +00:00
kadmind Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
kerberos Partial backout of rev. 1.6, but instead of putting kerberos5_server_flags 2007-10-19 08:59:59 +00:00
kernel This script should probably have an enabling variable since it can produce 2006-07-30 12:54:37 +00:00
keyserv Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
kldxref FILESYSTEMS requires root, so requiring both of them is redundant. 2007-04-09 08:53:40 +00:00
kpasswdd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
ldconfig Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +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 Start lockd after statd. 2007-09-03 02:02:31 +00:00
LOGIN Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
lpd Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
Makefile Backout sensors framework. 2007-10-15 20:00:24 +00:00
mdconfig sleep 2 seconds after having loaded g_uzip.ko. We need this because 2007-08-25 00:19:17 +00:00
mdconfig2 Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
mixer Introduce mixer_enable (default: YES). 2006-10-06 23:22:13 +00:00
motd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
mountcritlocal o Implement the stop_boot subroutine [1]. This subroutine can be used by 2007-05-18 12:04:41 +00:00
mountcritremote FILESYSTEMS requires root, so requiring both of them is redundant. 2007-04-09 08:53:40 +00:00
mountd mountd(8) was changed to only abort when all given exports files cannot be 2007-04-13 10:29:25 +00:00
mountlate o Implement the stop_boot subroutine [1]. This subroutine can be used by 2007-05-18 12:04:41 +00:00
moused Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
mroute6d Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
mrouted Push removal of mrouted down to the rest of the tree. 2006-09-29 15:45:11 +00:00
msgs Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
named 1. Determine the location of the rndc* binaries relative to $command 2007-10-22 09:38:44 +00:00
natd Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
netif Require 'cleanvar' so that files and sockets created in /var/run by 2007-07-25 18:08:01 +00:00
netoptions Move options that do not have anything to do with routing out of 2007-05-02 15:49:30 +00:00
network_ipv6 Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
NETWORKING Finish making resolv ordering deterministic by REQUIRE'ing it here. 2007-06-02 05:25:19 +00:00
newsyslog syslogd should REQUIRE newsyslog, rather than newsyslog using 2005-12-21 09:54:15 +00:00
nfsclient Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
nfsd Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nfslocking The rc.d/nfslocking file controls two servers: rpc.statd and rpc.lockd. It worked well 2007-08-17 07:58:26 +00:00
nfsserver Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
nisdomain Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
nscd Finishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile 2007-09-28 10:38:08 +00:00
nsswitch Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
ntpd - Add new ntpd_config variable so that people can override it in rc.conf. 2006-04-18 15:02:24 +00:00
ntpdate - Remove hardcoded /etc/ntp.conf configuration file from ntpdate rc.d script 2006-07-20 10:07:34 +00:00
othermta Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
pf FILESYSTEMS requires root, so requiring both of them is redundant. 2007-04-09 08:53:40 +00:00
pflog FILESYSTEMS requires root, so requiring both of them is redundant. 2007-04-09 08:53:40 +00:00
pfsync Add a pfsync_syncpeer option to /etc/defaults/rc.conf and rc.conf(5), 2007-04-10 16:42:14 +00:00
power_profile Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
powerd When stopping powerd, set the CPU frequency back to its maximum value 2006-08-27 11:04:39 +00:00
ppp Teach /etc/rc.d/ppp how to start/stop individual instances 2007-10-18 17:10:40 +00:00
pppoed Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
pwcheck Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
quota Add the following knobs for quotas if they are enabled: 2007-01-20 04:24:20 +00:00
random Get rid of chatter for failed commands if the filesystem is read-only. 2007-03-03 06:39:06 +00:00
rarpd "REQUIRE: cleanvar" for all RC's writing into /var/run. 2005-01-16 03:12:03 +00:00
resolv Add REQUIRE netif to make ordering more deterministic, and to make sure 2007-06-02 05:24:39 +00:00
root o Implement the stop_boot subroutine [1]. This subroutine can be used by 2007-05-18 12:04:41 +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 Move options that do not have anything to do with routing out of 2007-05-02 15:49:30 +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 Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
securelevel Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
sendmail Add a new rc.conf variable, sendmail_rebuild_aliases, which tells 2007-06-12 17:33:23 +00:00
serial Add an example of how to set up a 3-wire serial terminal. 2006-03-23 08:48:38 +00:00
SERVERS Make ldconfig as SERVER dependency. This makes it possible 2006-04-19 05:10:34 +00:00
sppp Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
sshd Backout this commit since it breaks startup and some scripts in 2006-08-22 11:17:29 +00:00
statd My forced commit to note the repo-copy (naturally) changed the $FreeBSD$ keyword line, 2007-08-18 04:08:53 +00:00
swap1 Stop method for swap1 script was introduced, because gmirror needed it. 2004-11-05 12:38:27 +00:00
syscons Use "-ne" instead of "!=" for integer comparison. 2007-03-25 23:58:46 +00:00
sysctl Quote the parameter to sysctl(1), allowing to use whitespaces in 2006-05-24 11:36:48 +00:00
syslogd Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
timed Remove the requirement for the FreeBSD keyword as it no longer 2004-10-07 13:55:26 +00:00
tmp Remove two unnecessary and useless sub-shell constructs. 2007-05-24 05:54:37 +00:00
ugidfw Use $required_modules wherever suitable. Use load_kld() in special 2006-12-31 10:37:18 +00:00
var Remove two unnecessary and useless sub-shell constructs. 2007-05-24 05:54:37 +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 Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
yppasswdd Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
ypserv Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
ypset Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
ypupdated Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
ypxfrd Eliminate global symbols starting with an underscore from rc.d 2006-12-30 22:53:20 +00:00
zfs When zfs dataset has jailed=on property, it won't be mounted with 2007-04-22 20:55:08 +00:00