]> git.meshlink.io Git - catta/commitdiff
fix fedora init script exit code (closes #115) patch from mbacovsk@redhat.com
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Apr 2007 21:59:02 +0000 (21:59 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 12 Apr 2007 21:59:02 +0000 (21:59 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1413 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

initscript/fedora/avahi-daemon.in
initscript/fedora/avahi-dnsconfd.in

index aead1be245a9ff7f84633c11788f50aced9d09f0..662684fa438b0be877ef804e610c8cd0ad7cc658 100644 (file)
@@ -80,7 +80,8 @@ case "$1" in
        ;;
   status)
         $AVAHI_BIN -c
-       [ $? = 0 ] && echo $"Avahi daemon is running" || echo $"Avahi daemon is not running"
+       RETVAL=$?
+       [ $RETVAL = 0 ] && echo $"Avahi daemon is running" || echo $"Avahi daemon is not running"
        ;;
   restart)
        restart
@@ -98,5 +99,5 @@ case "$1" in
        exit 1
 esac
 
-exit $?
+exit $RETVAL
 
index deb81fb0d9ef3bd506885be22489bdce415ed5c1..bdf93700d1006f114d0567bdc0698964078e87f5 100644 (file)
@@ -76,7 +76,8 @@ case "$1" in
        ;;
   status)
         $AVAHI_BIN -c
-       [ $? = 0 ] && echo "Avahi DNS daemon is running" || echo "Avahi DNS daemon is not running"
+        RETVAL=$?
+        [ $RETVAL = 0 ] && echo "Avahi DNS daemon is running" || echo "Avahi DNS daemon is not running"
        ;;
   restart)
        restart
@@ -95,5 +96,5 @@ case "$1" in
        ;;
 esac
 
-exit $?
+exit $RETVAL