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 newsyslog
15 command="/usr/sbin/${name}"
16 required_files="/etc/syslog.conf"
17 start_precmd="syslogd_precmd"
18 extra_commands="reload"
19 pidfile="/var/run/syslog.pid"
21 _sockfile="/var/run/syslogd.sockets"
22 evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\""
26 # Transitional symlink for old binaries
28 if [ ! -L /dev/log ]; then
29 ln -sf /var/run/log /dev/log
33 # Create default list of syslog sockets to watch
35 ( umask 022 ; > $_sockfile )
37 # Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
38 # and if $${app}_chrootdir is a directory, add appropriate
39 # syslog socket to list of sockets to watch.
41 for _lr in $(rcorder -k chrootdir /etc/rc.d/*); do
45 eval _ldir=\$${_l}_chrootdir
46 if checkyesno $_l && [ -n "$_ldir" ]; then
47 echo "${_ldir}/var/run/log" >> $_sockfile
52 # If other sockets have been provided, change run_rc_command()'s
53 # internal copy of $syslogd_flags to force use of specific
56 if [ -s $_sockfile ]; then
57 echo "/var/run/log" >> $_sockfile
67 for _s in `cat $_sockfile | tr '\n' ' '` ; do
68 _socketargs="-l $_s $_socketargs"