summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch')
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch b/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
new file mode 100644
index 0000000..7590df7
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
@@ -0,0 +1,52 @@
1From f774ac25f436a782ccccc4dbe68378a684596799 Mon Sep 17 00:00:00 2001
2From: Lu Chong <Chong.Lu@windriver.com>
3Date: Thu, 7 Nov 2013 14:36:28 +0800
4Subject: [PATCH] avahi: fix avahi status command error prompt
5
6service --status-all command will display wrong status for avahi-daemon.
7This commit fix this error prompt and make service display right status
8for avahi-daemon.
9
10Upstream-Status: Pending
11
12Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
13---
14 initscript/debian/avahi-daemon.in | 14 +++++++++++---
15 1 file changed, 11 insertions(+), 3 deletions(-)
16
17diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
18index 4793b46..49ec358 100755
19--- a/initscript/debian/avahi-daemon.in
20+++ b/initscript/debian/avahi-daemon.in
21@@ -153,7 +153,15 @@ d_reload() {
22 # Function that check the status of the daemon/service.
23 #
24 d_status() {
25- $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
26+ $DAEMON -c
27+ status=$?
28+ if [ $status = 0 ]; then
29+ echo "$DESC is running"
30+ return 0
31+ else
32+ echo "$DESC is not running"
33+ return 3
34+ fi
35 }
36
37 case "$1" in
38@@ -182,9 +190,9 @@ case "$1" in
39 d_status
40 ;;
41 *)
42- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2
43+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload|status}" >&2
44 exit 1
45 ;;
46 esac
47
48-exit 0
49+exit $?
50--
511.7.9.5
52