2
# Start/stop/restart the system logging daemons.
4
# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>.
5
# Modded for rsyslogd by Chris Elvidge <chris@lowe.ae> Sept 2005
10
if [ ! -e /dev/xconsole ]; then
11
mknod -m 640 /dev/xconsole p
13
chmod 0640 /dev/xconsole
15
chown 0:0 /dev/xconsole
19
if [ -x /usr/sbin/rsyslogd -a -x /usr/sbin/klogd ]; then
20
echo "Starting rsyslogd / klogd daemons: "
21
# this one listens on the "usual" socket /dev/log
22
echo "/usr/sbin/rsyslogd -i $pidfile1"
23
/usr/sbin/rsyslogd -i "$pidfile1"
24
# this one listens only to the UDP port
26
echo "/usr/sbin/rsyslogd -o -r0 -f $confile2 -i $pidfile2"
27
/usr/sbin/rsyslogd -o -r0 -f "$confile2" -i "$pidfile2"
28
sleep 1 # prevent syslogd/klogd race condition on SMP kernels
29
echo "/usr/sbin/klogd -c 3 -x"
30
# '-c 3' = display level 'error' or higher messages on console
31
# '-x' = turn off broken EIP translation
32
/usr/sbin/klogd -c 3 -x
37
killall rsyslogd 2> /dev/null
38
killall klogd 2> /dev/null
39
/usr/bin/rm pidfile1 2> /dev/null
40
/usr/bin/rm pidfile2 2> /dev/null
49
confile1=/etc/rsyslog.conf
50
pidfile1=/var/run/rsyslogd.pid
52
confile2=/etc/rsyslog.udp.conf
53
pidfile2=/var/run/rsyslogd.udp.pid
67
echo "usage $0 start|stop|restart"