From: Lennart Poettering Date: Thu, 6 Sep 2007 16:48:03 +0000 (+0000) Subject: merge fedora initscript changes, closes rhbz #246875 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=7c966a2bfbadce6e924fc6dd2053e614b0449ea2;p=catta merge fedora initscript changes, closes rhbz #246875 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1532 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/initscript/fedora/avahi-daemon.in b/initscript/fedora/avahi-daemon.in index a9d1e32..46318cf 100644 --- a/initscript/fedora/avahi-daemon.in +++ b/initscript/fedora/avahi-daemon.in @@ -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 diff --git a/initscript/fedora/avahi-dnsconfd.in b/initscript/fedora/avahi-dnsconfd.in index 6fde0ba..a86bea8 100644 --- a/initscript/fedora/avahi-dnsconfd.in +++ b/initscript/fedora/avahi-dnsconfd.in @@ -14,18 +14,21 @@ 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-dnsconfd -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-dnsconfd start() { + # Check that networking is configured. + [ ${NETWORKING} = "no" ] && exit 1 + echo -n $"Starting Avahi DNS daemon... " $AVAHI_BIN -D RETVAL=$? @@ -92,7 +95,7 @@ case "$1" in ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 + exit 2 ;; esac