Patchwork [4/5] cronie: fix init.d/crond status return value

login
register
mail settings
Submitter Yue Tao
Date Nov. 27, 2013, 7:55 a.m.
Message ID <1385538944-8585-4-git-send-email-Yue.Tao@windriver.com>
Download mbox | patch
Permalink /patch/62457/
State Accepted
Commit 1897cce1fc1ebd5a79b69f86e34f8c222ccd2751
Headers show

Comments

Yue Tao - Nov. 27, 2013, 7:55 a.m.
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
---
 meta/recipes-extended/cronie/cronie/crond.init |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Patch

diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init
index c8dffef..53b8514 100755
--- a/meta/recipes-extended/cronie/cronie/crond.init
+++ b/meta/recipes-extended/cronie/cronie/crond.init
@@ -43,11 +43,8 @@  case "$1" in
     fi
     ;;
   status)
-    if [ -n "`/bin/pidof $CROND`" ] ; then
-        echo "crond is running."
-    else
-        echo "crond is not running."
-    fi
+    status crond
+    exit $?
     ;;
   restart)
     $0 stop && sleep 1 && $0 start