summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-01-05 22:43:03 +0000
committerLennart Poettering <lennart@poettering.net>2007-01-05 22:43:03 +0000
commit64e22ecd9ab38afaaaa81e7cd9f1c901dfe03b9b (patch)
treef7c01f852f2d24d3e247099ee22beb990f1d892b
parent5183633d2f84c0e2a0342f49c9cab275adb43ed8 (diff)
debian init scripts: print a nice warning when not starting avahi due to settings in /etc/default
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1369 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rwxr-xr-xinitscript/debian/avahi-daemon.in11
-rwxr-xr-xinitscript/debian/avahi-dnsconfd.in11
2 files changed, 22 insertions, 0 deletions
diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
index 553db78..30a2c2f 100755
--- a/initscript/debian/avahi-daemon.in
+++ b/initscript/debian/avahi-daemon.in
@@ -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
diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
index ee63e06..ac34804 100755
--- a/initscript/debian/avahi-dnsconfd.in
+++ b/initscript/debian/avahi-dnsconfd.in
@@ -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