]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpcbind: fix init status and exit code
authorWenzong Fan <wenzong.fan@windriver.com>
Wed, 11 Dec 2013 09:07:06 +0000 (04:07 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Dec 2013 09:09:35 +0000 (09:09 +0000)
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@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-extended/rpcbind/rpcbind/init.d

index d418673aa0c080ebdd0397dd97c074a7c6b3fe2d..67499aa828b9626f1ec1b27fd336c6533b186795 100644 (file)
@@ -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 $?