Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d Build the list of names to check for $XXX_chrootdir...
details: https://anonhg.NetBSD.org/src/rev/8ca38ae52cd8
branches: trunk
changeset: 532988:8ca38ae52cd8
user: lukem <lukem%NetBSD.org@localhost>
date: Tue Jun 18 14:35:38 2002 +0000
description:
Build the list of names to check for $XXX_chrootdir support from
`rcorder -k chrootdir` rather than hardcoding "named ntpd".
Based on [misc/16884] from Jarle Greipsland <jarle%uninett.no@localhost>
diffstat:
etc/rc.d/named | 3 ++-
etc/rc.d/ntpd | 3 ++-
etc/rc.d/syslogd | 8 +++++---
3 files changed, 9 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r ed41e8b810cc -r 8ca38ae52cd8 etc/rc.d/named
--- a/etc/rc.d/named Tue Jun 18 14:17:05 2002 +0000
+++ b/etc/rc.d/named Tue Jun 18 14:35:38 2002 +0000
@@ -1,11 +1,12 @@
#!/bin/sh
#
-# $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
+# $NetBSD: named,v 1.11 2002/06/18 14:35:38 lukem Exp $
#
# PROVIDE: named
# REQUIRE: SERVERS
# BEFORE: DAEMON
+# KEYWORD: chrootdir
. /etc/rc.subr
diff -r ed41e8b810cc -r 8ca38ae52cd8 etc/rc.d/ntpd
--- a/etc/rc.d/ntpd Tue Jun 18 14:17:05 2002 +0000
+++ b/etc/rc.d/ntpd Tue Jun 18 14:35:38 2002 +0000
@@ -1,11 +1,12 @@
#!/bin/sh
#
-# $NetBSD: ntpd,v 1.8 2002/06/17 06:47:59 lukem Exp $
+# $NetBSD: ntpd,v 1.9 2002/06/18 14:35:39 lukem Exp $
#
# PROVIDE: ntpd
# REQUIRE: DAEMON
# BEFORE: LOGIN
+# KEYWORD: chrootdir
. /etc/rc.subr
diff -r ed41e8b810cc -r 8ca38ae52cd8 etc/rc.d/syslogd
--- a/etc/rc.d/syslogd Tue Jun 18 14:17:05 2002 +0000
+++ b/etc/rc.d/syslogd Tue Jun 18 14:35:38 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: syslogd,v 1.12 2002/03/22 04:34:00 thorpej Exp $
+# $NetBSD: syslogd,v 1.13 2002/06/18 14:35:39 lukem Exp $
#
# PROVIDE: syslogd
@@ -31,10 +31,12 @@
#
( umask 022 ; > $_sockfile )
- # If running named(8) or ntpd(8) chrooted, added appropriate
+ # Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
+ # and if $${app}_chrootdir is a directory, add appropriate
# syslog socket to list of sockets to watch.
#
- for _l in named ntpd; do
+ for _lr in $(rcorder -k chrootdir /etc/rc.d/*); do
+ _l=${_lr##*/}
eval _ldir=\$${_l}_chrootdir
if checkyesno $_l && [ -n "$_ldir" ]; then
echo "${_ldir}/var/run/log" >> $_sockfile
Home |
Main Index |
Thread Index |
Old Index