Skip to contentSkip to conversation

The status for "service --status-all" is wrong after stop avahi-daemon

PATCH In review Yue Tao 2 participants 2 messages Jan 27, 2014 – Jan 28, 2014

lore
Share & tools
lore

Yue Tao

author
#0 lore raw

PATCH 1/1 The status for "service --status-all" is wrong after stop avahi-daemon

$/etc/init.d/avahi-daemon stop
$service --status-all
[ + ] avahi-daemon

Add return value of status()

---
 .../avahi/files/add_return_value_of_status.patch   |   21 ++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch
meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch new file +21 -0
new file mode 100644
index 0000000..db80da8
@@ -0,0 +1,21 @@
+--- a/initscript/debian/avahi-daemon.in
++++ b/initscript/debian/avahi-daemon.in
+@@ -36,6 +36,8 @@
+ # Authors:      <[email protected]>
+ #
+ 
++. /etc/init.d/functions
++
+ if [ -f /lib/lsb/init-functions ]
+ then
+     . /lib/lsb/init-functions
+@@ -153,7 +155,8 @@ d_reload() {
+ #       Function that check the status of the daemon/service.
+ #
+ d_status() {
+-    $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
++    status $DAEMON
++    exit $?
+ }
+ 
+ case "$1" in
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 6 lines · Yue Tao

$/etc/init.d/avahi-daemon stop
$service --status-all
[ + ] avahi-daemon

Add return value of status()

The short message needs to be formatted correctly:

avahi: <short log>

Also this patch is not added to the recipe file.

meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch

Quoted 12 lines
---
  .../avahi/files/add_return_value_of_status.patch   |   21 ++++++++++++++++++++
  1 files changed, 21 insertions(+), 0 deletions(-)

create mode 100644 meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch

meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch new file +0 -0
new file mode 100644
index 0000000..db80da8
@@ -0,0 +1,21 @@

No Signed-off-by: or Upstream-Status: tags here

Sau!

Quoted 22 lines
meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch new file +21 -0
+--- a/initscript/debian/avahi-daemon.in
++++ b/initscript/debian/avahi-daemon.in
+@@ -36,6 +36,8 @@
+ # Authors:      <[email protected]>
+ #
+
++. /etc/init.d/functions
++
+ if [ -f /lib/lsb/init-functions ]
+ then
+     . /lib/lsb/init-functions
+@@ -153,7 +155,8 @@ d_reload() {
+ #       Function that check the status of the daemon/service.
+ #
+ d_status() {
+-    $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
++    status $DAEMON
++    exit $?
+ }
+
+ case "$1" in