[oe-commits] Wenzong Fan : rpcbind: fix init status and exit code

git at git.openembedded.org git at git.openembedded.org
Sat Dec 14 09:09:22 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: f07c2519c4ccfc847d7184d7eada6d7620950277
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f07c2519c4ccfc847d7184d7eada6d7620950277

Author: Wenzong Fan <wenzong.fan at windriver.com>
Date:   Wed Dec 11 04:07:06 2013 -0500

rpcbind: fix init status and exit code

Print status messages and exit with proper code. This also allows debian
service script to get rpcbind status correctly.

Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-extended/rpcbind/rpcbind/init.d | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
index d418673..67499aa 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/init.d
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -16,6 +16,9 @@
 #                    RPC include NFS and NIS.
 ### END INIT INFO
 
+# Source function library.
+. /etc/init.d/functions
+
 test -f /sbin/rpcbind || exit 0
 
 OPTIONS=""
@@ -73,8 +76,7 @@ case "$1" in
         start $OPTIONS
         ;;
     status)
-        pidof /sbin/rpcbind >/dev/null
-        exit $?
+        status /sbin/rpcbind
         ;;
     *)
         echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
@@ -82,4 +84,4 @@ case "$1" in
         ;;
 esac
 
-exit 0
+exit $?



More information about the Openembedded-commits mailing list