3 # $NetBSD: syslogd,v 1.14 2004/08/13 18:08:03 mycroft Exp $
7 # REQUIRE: mountcritremote sysdb wscons
10 $_rc_subr_loaded .
/etc
/rc.subr
14 command="/usr/sbin/${name}"
15 pidfile
="/var/run/${name}.pid"
16 required_files
="/etc/syslog.conf"
17 start_precmd
="syslogd_precmd"
18 extra_commands
="reload"
20 _sockfile
="/var/run/syslogd.sockets"
24 # Transitional symlink for old binaries
26 if [ ! -h /dev
/log
]; then
27 ln -sf /var
/run
/log
/dev
/log
30 # Create default list of syslog sockets to watch
32 ( umask 022 ; > $_sockfile )
34 # Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
35 # and if $${app}_chrootdir is a directory, add appropriate
36 # syslog socket to list of sockets to watch.
38 for _lr
in $
(rcorder
-k chrootdir
/etc
/rc.d
/*); do
42 eval _ldir
=\$
${_l}_chrootdir
43 if checkyesno
$_l && [ -n "$_ldir" ]; then
44 echo "${_ldir}/var/run/log" >> $_sockfile
49 # If other sockets have been provided, change run_rc_command()'s
50 # internal copy of $syslogd_flags to force use of specific
53 if [ -s $_sockfile ]; then
54 echo "/var/run/log" >> $_sockfile
55 rc_flags
="-P $_sockfile $rc_flags"