summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2013-12-11 04:07:06 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-14 09:11:16 +0000
commit46215bd89e2e1136d6af7bacd5931952ee21716b (patch)
tree73590dd6a70a6381cfeaf3fab8afbea7a1a07877 /meta
parent9b43c57eb2ccc0815ed65843ffb1247633b930e6 (diff)
downloadast2050-yocto-poky-46215bd89e2e1136d6af7bacd5931952ee21716b.zip
ast2050-yocto-poky-46215bd89e2e1136d6af7bacd5931952ee21716b.tar.gz
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. (From OE-Core rev: f07c2519c4ccfc847d7184d7eada6d7620950277) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/init.d8
1 files 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 $?
OpenPOWER on IntegriCloud