]> git.meshlink.io Git - catta/commitdiff
debian init scripts: print a nice warning when not starting avahi due to settings...
authorLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2007 22:43:03 +0000 (22:43 +0000)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2007 22:43:03 +0000 (22:43 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1369 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

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

index 553db781513c055e9ef21e76e086ad15f45efdb1..30a2c2f2bba0caa0951fa8463b5185c6f04b111f 100755 (executable)
@@ -75,6 +75,16 @@ else
        return $1
     }
     
+    log_warning_msg () {
+       if log_use_fancy_output; then
+           YELLOW=`$TPUT setaf 3`
+           NORMAL=`$TPUT op`
+           echo "$YELLOW*$NORMAL $@"
+       else
+           echo "$@"
+       fi
+    }
+
 fi
 
 #set -e
@@ -93,6 +103,7 @@ AVAHI_DAEMON_START=1
 test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
 
 if [ "$AVAHI_DAEMON_START" != "1" -a "$1" != "stop" ]; then
+    log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
     exit 0
 fi
 
index ee63e06730ffbcc64851deafa2a72408a11fbf66..ac3480451faf435f73d4b79c05d65a809f2d43af 100755 (executable)
@@ -75,6 +75,16 @@ else
        return $1
     }
     
+    log_warning_msg () {
+       if log_use_fancy_output; then
+           YELLOW=`$TPUT setaf 3`
+           NORMAL=`$TPUT op`
+           echo "$YELLOW*$NORMAL $@"
+       else
+           echo "$@"
+       fi
+    }
+
 fi
 
 #set -e
@@ -93,6 +103,7 @@ AVAHI_DNSCONFD_START=1
 test -f /etc/default/avahi-dnsconfd && . /etc/default/avahi-dnsconfd
 
 if [ "$AVAHI_DNSCONFD_START" != "1" -a "$1" != "stop" ]; then
+    log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
     exit 0
 fi