From f032008b12cbbb5b4e54cdf6eef024fa5d4f695e Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 21 Aug 2013 01:28:17 -0400 Subject: [PATCH] nfs-utils: add init.d/nfsserver status command for LSB compliance (From OE-Core rev: d5132337fa08ee74eaebadaeaecb6b4f5b2c5190) Signed-off-by: Li Wang Signed-off-by: Jackie Huang Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../nfs-utils/nfs-utils/nfsserver | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index e460e26af0..1ac6fec023 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