X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=initscript%2Ffedora%2Favahi-daemon.in;h=c5b32307d2f4e85c55e7761a8e7b1b40a5e975aa;hb=78a76e3d5f1d9cc81fd901b8e0263483a7c707d0;hp=a9d1e3264a60cab2ece56ecb2e8c18732c9a2da4;hpb=672a9ae57083ba3022dad773e49792bc11c75e1c;p=catta diff --git a/initscript/fedora/avahi-daemon.in b/initscript/fedora/avahi-daemon.in index a9d1e32..c5b3230 100644 --- a/initscript/fedora/avahi-daemon.in +++ b/initscript/fedora/avahi-daemon.in @@ -2,32 +2,36 @@ # # avahi-daemon: Starts the Avahi Daemon # -# chkconfig: 345 97 02 +# chkconfig: 345 24 02 # description: This is a daemon which runs on client machines to perform \ # Zeroconf service discovery on a network. avahi-daemon must be \ # running on systems that use Avahi for service discovery. \ # Avahi-daemon should not be running otherwise. # processname: avahi-daemon -# config: +# config: + +AVAHI_BIN=@sbindir@/avahi-daemon + +if [ "$1" = 'status' ]; then + test -x $AVAHI_BIN || exit 4 +else + test -x $AVAHI_BIN || exit 5 +fi 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 - 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 @@ -87,7 +91,7 @@ case "$1" in restart ;; reload) - reload + reload ;; condrestart) if [ -f $LOCKFILE ]; then @@ -96,8 +100,8 @@ case "$1" in ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 + exit 2 + ;; esac exit $RETVAL -