Commit c48988ce authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: don't start rsyslog if unconfigured

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 0b21e8ad
#!/bin/sh
start() {
# Check the configuration file: if there's no target, don't run the thing.
if ! grep -q '^##.*remote-host' /etc/rsyslog.conf; then
echo -n "Starting rsyslog: "
/usr/sbin/rsyslogd
echo "OK"
else
echo "Not starting rsyslog: no target host selected"
fi
}
stop() {
if pidof rsyslogd > /dev/null; then
echo -n "Stopping rsyslog: "
start-stop-daemon -K -q -p /var/log/rsyslog.pid
echo "OK"
fi
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
......@@ -28,10 +28,6 @@
ttyGS0::respawn:/bin/ash --login
ttyS0::respawn:/bin/ash --login
# Logging junk
null::sysinit:/usr/sbin/rsyslogd
# Stuff to do before rebooting
null::shutdown:/usr/bin/killall rsyslogd
null::shutdown:/bin/umount -a -r
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment