3 # $NetBSD: syslogd,v 1.12 2002/03/22 04:34:00 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/syslogd,v 1.4 2002/10/01 13:29:44 ru Exp $
8 # REQUIRE: mountcritremote sysdb
15 command="/usr/sbin/${name}"
16 required_files
="/etc/syslog.conf"
17 start_precmd
="syslogd_precmd"
18 extra_commands
="reload"
20 _sockfile
="/var/run/syslogd.sockets"
22 pidfile
="/var/run/syslog.pid"
23 evalargs
="rc_flags=\"\`set_socketlist\` \$rc_flags\""
27 # Transitional symlink for old binaries
29 if [ ! -L /dev
/log
]; then
30 ln -sf /var
/run
/log
/dev
/log
34 # Create default list of syslog sockets to watch
36 ( umask 022 ; > $_sockfile )
38 # Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
39 # and if $${app}_chrootdir is a directory, add appropriate
40 # syslog socket to list of sockets to watch.
42 for _lr
in $
(rcorder
-k chrootdir
/etc
/rc.d
/*); do
46 eval _ldir
=\$
${_l}_chrootdir
47 if checkyesno
$_l && [ -n "$_ldir" ]; then
48 echo "${_ldir}/var/run/log" >> $_sockfile
53 # If other sockets have been provided, change run_rc_command()'s
54 # internal copy of $syslogd_flags to force use of specific
57 if [ -s $_sockfile ]; then
58 echo "/var/run/log" >> $_sockfile
68 for _s
in `cat $_sockfile | tr '\n' ' '` ; do
69 _socketargs
="-l $_s $_socketargs"