From f25eee8d084ce366e923c31de49ee7b70e45eb7b Mon Sep 17 00:00:00 2001 From: dougb Date: Wed, 16 Jul 2008 19:50:29 +0000 Subject: [PATCH] Add the shutdown KEYWORD to those scripts that start persistent services to allow them to do a "clean" shutdown. I purposely avoided making changes to network-related stuff since the system shutting down is pretty conclusive, and there may be complicated dependencies on the network that I would rather not try to unravel. I also skipped kerberos-related stuff for the reasons above, and because I have no way to test it. --- etc/rc.d/amd | 2 +- etc/rc.d/apmd | 2 +- etc/rc.d/bsnmpd | 2 +- etc/rc.d/bthidd | 2 +- etc/rc.d/devd | 2 +- etc/rc.d/ftp-proxy | 1 + etc/rc.d/ftpd | 1 + etc/rc.d/hcsecd | 2 +- etc/rc.d/idmapd | 2 +- etc/rc.d/keyserv | 1 + etc/rc.d/lockd | 2 +- etc/rc.d/lpd | 1 + etc/rc.d/mountd | 2 +- etc/rc.d/moused | 2 +- etc/rc.d/nfsd | 2 +- etc/rc.d/nscd | 1 + etc/rc.d/ntpd | 2 +- etc/rc.d/powerd | 2 +- etc/rc.d/rpcbind | 1 + etc/rc.d/rtadvd | 2 +- etc/rc.d/rwho | 1 + etc/rc.d/sdpd | 2 +- etc/rc.d/sendmail | 1 + etc/rc.d/sshd | 1 + etc/rc.d/statd | 2 +- etc/rc.d/timed | 2 +- etc/rc.d/ugidfw | 2 +- etc/rc.d/watchdogd | 2 +- etc/rc.d/ypbind | 1 + etc/rc.d/yppasswdd | 1 + etc/rc.d/ypserv | 1 + etc/rc.d/ypset | 1 + etc/rc.d/ypupdated | 1 + etc/rc.d/ypxfrd | 1 + 34 files changed, 34 insertions(+), 19 deletions(-) diff --git a/etc/rc.d/amd b/etc/rc.d/amd index 546f65271460..a0e0dc8c44c3 100755 --- a/etc/rc.d/amd +++ b/etc/rc.d/amd @@ -6,7 +6,7 @@ # PROVIDE: amd # REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/apmd b/etc/rc.d/apmd index 7b56d2f476b5..c2d69674a963 100755 --- a/etc/rc.d/apmd +++ b/etc/rc.d/apmd @@ -6,7 +6,7 @@ # PROVIDE: apmd # REQUIRE: DAEMON apm # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/bsnmpd b/etc/rc.d/bsnmpd index e266c3ba448f..c24a08f34973 100755 --- a/etc/rc.d/bsnmpd +++ b/etc/rc.d/bsnmpd @@ -5,7 +5,7 @@ # PROVIDE: bsnmpd # REQUIRE: NETWORKING syslogd -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/bthidd b/etc/rc.d/bthidd index 5a784f65472b..907305e2f7d9 100755 --- a/etc/rc.d/bthidd +++ b/etc/rc.d/bthidd @@ -6,7 +6,7 @@ # PROVIDE: bthidd # REQUIRE: DAEMON hcsecd # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/devd b/etc/rc.d/devd index 7b0df846d5eb..8ce575a8cd35 100755 --- a/etc/rc.d/devd +++ b/etc/rc.d/devd @@ -6,7 +6,7 @@ # PROVIDE: devd # REQUIRE: netif network_ipv6 # BEFORE: NETWORKING mountcritremote -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/ftp-proxy b/etc/rc.d/ftp-proxy index 4ef40d9393a2..6712e6837ca6 100755 --- a/etc/rc.d/ftp-proxy +++ b/etc/rc.d/ftp-proxy @@ -5,6 +5,7 @@ # PROVIDE: ftp-proxy # REQUIRE: DAEMON pf +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/ftpd b/etc/rc.d/ftpd index 4837815f75bd..338d73523857 100755 --- a/etc/rc.d/ftpd +++ b/etc/rc.d/ftpd @@ -5,6 +5,7 @@ # PROVIDE: ftpd # REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/hcsecd b/etc/rc.d/hcsecd index c78ce9dabe30..fd6a925a3356 100755 --- a/etc/rc.d/hcsecd +++ b/etc/rc.d/hcsecd @@ -6,7 +6,7 @@ # PROVIDE: hcsecd # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/idmapd b/etc/rc.d/idmapd index c5e38867153a..4c90fd4d04c6 100755 --- a/etc/rc.d/idmapd +++ b/etc/rc.d/idmapd @@ -5,7 +5,7 @@ # PROVIDE: idmapd # REQUIRE: rpcbind -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/keyserv b/etc/rc.d/keyserv index 5792ad4113db..72188e0767ef 100755 --- a/etc/rc.d/keyserv +++ b/etc/rc.d/keyserv @@ -8,6 +8,7 @@ # PROVIDE: keyserv # REQUIRE: ypbind # BEFORE: DAEMON +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd index 809b2ff544fe..1a3fc6b8ee85 100755 --- a/etc/rc.d/lockd +++ b/etc/rc.d/lockd @@ -7,7 +7,7 @@ # PROVIDE: lockd # REQUIRE: nfsserver nfsclient nfsd rpcbind statd # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/lpd b/etc/rc.d/lpd index eae99e87cf2b..552e0680e88a 100755 --- a/etc/rc.d/lpd +++ b/etc/rc.d/lpd @@ -6,6 +6,7 @@ # PROVIDE: lpd # REQUIRE: DAEMON # BEFORE: LOGIN +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd index 12d441d83fa9..6f82601799f5 100755 --- a/etc/rc.d/mountd +++ b/etc/rc.d/mountd @@ -5,7 +5,7 @@ # PROVIDE: mountd # REQUIRE: NETWORKING nfsserver rpcbind quota -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/moused b/etc/rc.d/moused index 06a013bc30f6..ec50789dbfe5 100755 --- a/etc/rc.d/moused +++ b/etc/rc.d/moused @@ -5,7 +5,7 @@ # PROVIDE: moused # REQUIRE: DAEMON cleanvar -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd index 83ba9cd9f2f7..b60c5c84768a 100755 --- a/etc/rc.d/nfsd +++ b/etc/rc.d/nfsd @@ -5,7 +5,7 @@ # PROVIDE: nfsd # REQUIRE: mountd -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/nscd b/etc/rc.d/nscd index 3eb88232ad4f..acf63ab06d04 100755 --- a/etc/rc.d/nscd +++ b/etc/rc.d/nscd @@ -6,6 +6,7 @@ # PROVIDE: nscd # REQUIRE: DAEMON # BEFORE: LOGIN +# KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable nscd: diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd index d4b738f022f2..7a4eef82c669 100755 --- a/etc/rc.d/ntpd +++ b/etc/rc.d/ntpd @@ -6,7 +6,7 @@ # PROVIDE: ntpd # REQUIRE: DAEMON ntpdate cleanvar devfs # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/powerd b/etc/rc.d/powerd index fe7237e5bd3f..e59d979b6932 100755 --- a/etc/rc.d/powerd +++ b/etc/rc.d/powerd @@ -6,7 +6,7 @@ # PROVIDE: powerd # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/rpcbind b/etc/rc.d/rpcbind index c6661089cd47..a30f1029c9db 100755 --- a/etc/rc.d/rpcbind +++ b/etc/rc.d/rpcbind @@ -5,6 +5,7 @@ # PROVIDE: rpcbind # REQUIRE: NETWORKING ntpdate syslogd named +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd index 8c9dc530460a..0d3c9d3cc7ff 100755 --- a/etc/rc.d/rtadvd +++ b/etc/rc.d/rtadvd @@ -6,7 +6,7 @@ # PROVIDE: rtadvd # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/rwho b/etc/rc.d/rwho index 665bab35a7c9..e088d991eef1 100755 --- a/etc/rc.d/rwho +++ b/etc/rc.d/rwho @@ -6,6 +6,7 @@ # PROVIDE: rwho # REQUIRE: DAEMON # BEFORE: LOGIN +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/sdpd b/etc/rc.d/sdpd index ccf2257d54ac..acaf380bf561 100755 --- a/etc/rc.d/sdpd +++ b/etc/rc.d/sdpd @@ -6,7 +6,7 @@ # PROVIDE: sdpd # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail index 7814d1fe879a..dfaa8e0157b2 100755 --- a/etc/rc.d/sendmail +++ b/etc/rc.d/sendmail @@ -7,6 +7,7 @@ # REQUIRE: LOGIN cleanvar # we make mail start late, so that things like .forward's are not # processed until the system is fully operational +# KEYWORD: shutdown # XXX - Get together with sendmail mantainer to figure out how to # better handle SENDMAIL_ENABLE and 3rd party MTAs. diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd index 84f1ef2bcc9b..fd95d5ad0a49 100755 --- a/etc/rc.d/sshd +++ b/etc/rc.d/sshd @@ -5,6 +5,7 @@ # PROVIDE: sshd # REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/statd b/etc/rc.d/statd index bdb40953326e..85e003df0560 100755 --- a/etc/rc.d/statd +++ b/etc/rc.d/statd @@ -7,7 +7,7 @@ # PROVIDE: statd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/timed b/etc/rc.d/timed index bd7d8c12bcda..d1cf1a22536c 100755 --- a/etc/rc.d/timed +++ b/etc/rc.d/timed @@ -6,7 +6,7 @@ # PROVIDE: timed # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/ugidfw b/etc/rc.d/ugidfw index 01632c990dfd..d65d6a3633a6 100755 --- a/etc/rc.d/ugidfw +++ b/etc/rc.d/ugidfw @@ -4,7 +4,7 @@ # PROVIDE: ugidfw # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/watchdogd b/etc/rc.d/watchdogd index 3e12f54be96a..e8521263620d 100755 --- a/etc/rc.d/watchdogd +++ b/etc/rc.d/watchdogd @@ -29,7 +29,7 @@ # PROVIDE: watchdogd # REQUIRE: DAEMON cleanvar -# KEYWORD: nojail +# KEYWORD: nojail shutdown . /etc/rc.subr diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind index edf15b934d67..4dbf3519f390 100755 --- a/etc/rc.d/ypbind +++ b/etc/rc.d/ypbind @@ -6,6 +6,7 @@ # PROVIDE: ypbind # REQUIRE: ypserv # BEFORE: DAEMON +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd index 86e38edfa01c..dcaa2f8cdc00 100755 --- a/etc/rc.d/yppasswdd +++ b/etc/rc.d/yppasswdd @@ -6,6 +6,7 @@ # PROVIDE: yppasswdd # REQUIRE: ypserv ypbind # BEFORE: LOGIN +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/ypserv b/etc/rc.d/ypserv index 1c056b9c9ff5..8e17fd77398b 100755 --- a/etc/rc.d/ypserv +++ b/etc/rc.d/ypserv @@ -5,6 +5,7 @@ # PROVIDE: ypserv # REQUIRE: rpcbind +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/ypset b/etc/rc.d/ypset index bc2c154365e1..78c408bde8dd 100755 --- a/etc/rc.d/ypset +++ b/etc/rc.d/ypset @@ -5,6 +5,7 @@ # PROVIDE: ypset # REQUIRE: ypbind +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/ypupdated b/etc/rc.d/ypupdated index e1d6fd73a15f..98ef2038565f 100755 --- a/etc/rc.d/ypupdated +++ b/etc/rc.d/ypupdated @@ -5,6 +5,7 @@ # PROVIDE: ypupdated # REQUIRE: rpcbind ypserv +# KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/ypxfrd b/etc/rc.d/ypxfrd index dd9488a96677..f125a30159db 100755 --- a/etc/rc.d/ypxfrd +++ b/etc/rc.d/ypxfrd @@ -5,6 +5,7 @@ # PROVIDE: ypxfrd # REQUIRE: rpcbind ypserv +# KEYWORD: shutdown . /etc/rc.subr