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

login
register
mail settings
Submitter Yue Tao
Date Jan. 27, 2014, 2:07 a.m.
Message ID <1390788441-6563-1-git-send-email-Yue.Tao@windriver.com>
Download mbox | patch
Permalink /patch/65869/
State New
Headers show

Comments

Yue Tao - Jan. 27, 2014, 2:07 a.m.
$/etc/init.d/avahi-daemon stop
$service --status-all
[ + ] avahi-daemon

Add return value of status()

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
---
 .../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
Saul Wold - Jan. 28, 2014, 6:22 p.m.
On 01/26/2014 06:07 PM, Yue Tao wrote:
> $/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.

> Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
> ---
>   .../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
>
> diff --git a/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch b/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch
> new file mode 100644
> index 0000000..db80da8
> --- /dev/null
> +++ b/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch
> @@ -0,0 +1,21 @@

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

Sau!

> +--- a/initscript/debian/avahi-daemon.in
> ++++ b/initscript/debian/avahi-daemon.in
> +@@ -36,6 +36,8 @@
> + # Authors:      <sebastien.estienne@gmail.com>
> + #
> +
> ++. /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
>

Patch

diff --git a/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch b/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch
new file mode 100644
index 0000000..db80da8
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/add_return_value_of_status.patch
@@ -0,0 +1,21 @@ 
+--- a/initscript/debian/avahi-daemon.in
++++ b/initscript/debian/avahi-daemon.in
+@@ -36,6 +36,8 @@
+ # Authors:      <sebastien.estienne@gmail.com>
+ #
+ 
++. /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