diff options
author | Lu Chong <Chong.Lu@windriver.com> | 2013-11-07 12:40:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-08 17:31:35 +0000 |
commit | bd53283b599ae57a50e1966089222f3b9a81db12 (patch) | |
tree | 6a9a03c53ec381c254b886dffea2b6bc880cb7b7 | |
parent | 44121975a65a0382c61aecf99495177c21fc244a (diff) | |
download | poky-bd53283b599ae57a50e1966089222f3b9a81db12.tar.gz |
avahi: fix avahi status command error prompt
service --status-all command will display wrong status for avahi-daemon.
This commit fix this error prompt and make service display right status
for avahi-daemon.
(From OE-Core rev: a0525f3da109848e4b1989247b07fac411b270ce)
Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 1 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch | 52 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc index cf063db8b0..00622f338a 100644 --- a/meta/recipes-connectivity/avahi/avahi.inc +++ b/meta/recipes-connectivity/avahi/avahi.inc | |||
@@ -25,6 +25,7 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | |||
25 | file://avahi_fix_install_issue.patch \ | 25 | file://avahi_fix_install_issue.patch \ |
26 | file://fix_for_automake_1.12.x.patch \ | 26 | file://fix_for_automake_1.12.x.patch \ |
27 | file://out-of-tree.patch \ | 27 | file://out-of-tree.patch \ |
28 | file://0001-avahi-fix-avahi-status-command-error-prompt.patch \ | ||
28 | " | 29 | " |
29 | 30 | ||
30 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | 31 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" |
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 0000000000..7590df79f0 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From f774ac25f436a782ccccc4dbe68378a684596799 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lu Chong <Chong.Lu@windriver.com> | ||
3 | Date: Thu, 7 Nov 2013 14:36:28 +0800 | ||
4 | Subject: [PATCH] avahi: fix avahi status command error prompt | ||
5 | |||
6 | service --status-all command will display wrong status for avahi-daemon. | ||
7 | This commit fix this error prompt and make service display right status | ||
8 | for avahi-daemon. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-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 | |||
17 | diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in | ||
18 | index 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 | -- | ||
51 | 1.7.9.5 | ||
52 | |||