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 $
5 # $DragonFly: src/etc/rc.d/syslogd,v 1.6 2005/11/19 21:47:32 swildner Exp $
9 # REQUIRE: mountcritremote sysdb
16 command="/usr/sbin/${name}"
17 required_files
="/etc/syslog.conf"
18 start_precmd
="syslogd_precmd"
19 extra_commands
="reload"
21 _sockfile
="/var/run/syslogd.sockets"
23 pidfile
="/var/run/syslog.pid"
24 evalargs
="rc_flags=\"\`set_socketlist\` \$rc_flags\""
25 altlog_proglist
="named"
29 # Transitional symlink for old binaries
31 if [ ! -L /dev
/log
]; then
32 ln -sf /var
/run
/log
/dev
/log
36 # Create default list of syslog sockets to watch
38 ( umask 022 ; > $_sockfile )
40 # If running named(8) chrooted, added appropriate
41 # syslog socket to list of sockets to watch.
43 for _l
in $altlog_proglist; do
44 eval _ldir
=\$
${_l}_chrootdir
45 if checkyesno
`set_rcvar $_l` && [ -n "$_ldir" ]; then
46 echo "${_ldir}/var/run/log" >> $_sockfile
50 # If other sockets have been provided, change run_rc_command()'s
51 # internal copy of $syslogd_flags to force use of specific
54 if [ -s $_sockfile ]; then
55 echo "/var/run/log" >> $_sockfile
65 for _s
in `cat $_sockfile | tr '\n' ' '` ; do
66 _socketargs
="-l $_s $_socketargs"