]> git.meshlink.io Git - catta/blobdiff - initscript/fedora/avahi-daemon.in
merge fedora initscript changes, closes rhbz #246875
[catta] / initscript / fedora / avahi-daemon.in
index a9d1e3264a60cab2ece56ecb2e8c18732c9a2da4..46318cfa4ef6e2d665bc3f1ab836b9516a2586ed 100644 (file)
@@ -14,20 +14,25 @@ OTHER_AVAHI_OPTS=""
 
 # Source function library.
 . /etc/init.d/functions
-
 . /etc/sysconfig/network
 
-# Check that networking is configured.
-[ ${NETWORKING} = "no" ] && exit 0
 
 AVAHI_BIN=@sbindir@/avahi-daemon
-test -x $AVAHI_BIN || exit 5
+
+if [ $1 == 'status' ]; then
+    test -x $AVAHI_BIN || exit 4
+else 
+    test -x $AVAHI_BIN || exit 5
+fi
 
 LOCKFILE=/var/lock/subsys/avahi-daemon
 
 base=${0##*/}
 
 start() {
+    # Check that networking is configured.
+    [ ${NETWORKING} = "no" ] && exit 1
+
        echo -n $"Starting Avahi daemon... "
        if [ -s /etc/localtime ]; then
            cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
@@ -96,7 +101,7 @@ case "$1" in
        ;;
   *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart}"
-       exit 1
+       exit 2
 esac
 
 exit $RETVAL