nfs-utils: add init.d/nfsserver status command for LSB compliance

(From OE-Core rev: d5132337fa08ee74eaebadaeaecb6b4f5b2c5190)

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@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:
Jackie Huang 2013-08-21 01:28:17 -04:00 committed by Richard Purdie
parent 4309a9ea8f
commit f032008b12
1 changed files with 11 additions and 0 deletions

View File

@ -14,6 +14,8 @@
#
# Startup script for nfs-utils
#
# Source function library.
. /etc/init.d/functions
#
# The environment variable NFS_SERVERS may be set in /etc/default/nfsd
# Other control variables may be overridden here too
@ -141,6 +143,13 @@ stop) exportfs -ua
stop_statd
stop_mountd
stop_nfsd;;
status)
status /usr/sbin/rpc.mountd
RETVAL=$?
status nfsd
rval=$?
[ $RETVAL -eq 0 ] && exit $rval
exit $RETVAL;;
reload) test -r /etc/exports && exportfs -r;;
restart)exportfs -ua
stop_mountd
@ -150,4 +159,6 @@ restart)exportfs -ua
start_mountd
start_statd
test -r /etc/exports && exportfs -a;;
*) echo "Usage: $0 {start|stop|status|reload|restart}"
exit 1;;
esac