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>
This commit is contained in:
parent
9b43c57eb2
commit
46215bd89e
|
@ -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 $?
|
||||
|
|
Loading…
Reference in New Issue