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>
This commit is contained in:
parent
e8477b6fb8
commit
da820a3387
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 @@ syslogd_precmd()
|
||||
#
|
||||
( 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user