From: Andrew Ruthven Date: Wed, 29 Oct 2008 22:03:31 +0000 (+1300) Subject: Make sure that the init.d script doesn't terminate if mythtv-status has warnings. X-Git-Tag: debian-0.9.0-4~1 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61ed670afed347e043e68f0997662e9b175a8ebf;p=mythtv-status.git Make sure that the init.d script doesn't terminate if mythtv-status has warnings. --- diff --git a/debian/init.d b/debian/init.d index 9c2f979..a254df5 100644 --- a/debian/init.d +++ b/debian/init.d @@ -64,11 +64,16 @@ case "$1" in cp /var/run/motd.orig /var/run/motd.new - $DAEMON $ARGS -h $HOST >> /var/run/motd.new - if [ $? -eq 0 -o $? -eq 1 ]; then + set +e + $DAEMON $ARGS -h $HOST >> /var/run/motd.new 2> /dev/null + ret=$? + set -e + if [ $ret -eq 0 -o $ret -eq 1 ]; then mv /var/run/motd.new /var/run/motd + log_end_msg 0 + else + log_failure_msg fi - log_end_msg 0 ;; stop) log_daemon_msg "Stopping $DESC" "$NAME"