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>
# RPC include NFS and NIS.
### END INIT INFO
+# Source function library.
+. /etc/init.d/functions
+
test -f /sbin/rpcbind || exit 0
OPTIONS=""
start $OPTIONS
;;
status)
- pidof /sbin/rpcbind >/dev/null
- exit $?
+ status /sbin/rpcbind
;;
*)
echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
;;
esac
-exit 0
+exit $?