From 61ed670afed347e043e68f0997662e9b175a8ebf Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Thu, 30 Oct 2008 11:03:31 +1300 Subject: [PATCH] Make sure that the init.d script doesn't terminate if mythtv-status has warnings. --- debian/init.d | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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" -- 2.30.2