diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2013-08-21 01:28:17 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:26:00 +0100 |
commit | d5132337fa08ee74eaebadaeaecb6b4f5b2c5190 (patch) | |
tree | d9fa9a756c2ceb11aadc6e1f662ddd3291e00e60 | |
parent | 7f0314c095032c231e2408c0276fea56b4e68884 (diff) | |
download | openembedded-core-contrib-d5132337fa08ee74eaebadaeaecb6b4f5b2c5190.tar.gz |
nfs-utils: add init.d/nfsserver status command for LSB compliance
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>
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index e460e26af0f..1ac6fec0238 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver @@ -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 |