]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - rpcsvcgssd.init
- init script and options for blkmapd
[packages/nfs-utils.git] / rpcsvcgssd.init
index 4c634bf8f7005b459af6be919dcbfac66a4c90cc..cf5bc630e294a9f18e6674ff53a7a275a48e6f67 100644 (file)
@@ -36,33 +36,35 @@ is_yes "${SECURE_NFS}" || exit 0
 
 start() {
        # Check if the service is already running?
-       if [ ! -f /var/lock/subsys/svcgssd ]; then
-               # We need /proc/fs/nfsd mounted before starting svcgssd
-               if ! grep -q nfsd /proc/mounts ; then
-                       modprobe -s nfsd > /dev/null 2>&1
-                       run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
-               fi
-               # Load rpcsec modules
-               for i in ${SECURE_NFS_MODS} ; do 
-                       _modprobe single die $i
-               done
-               msg_starting "RPC svcgssd"
-               daemon rpc.svcgssd $RPCSVCGSSOPTIONS
-               RETVAL=$?
-               [ $RETVAL = 0 ] && touch /var/lock/subsys/svcgssd
-       else
+       if [ -f /var/lock/subsys/svcgssd ]; then
                msg_already_running "RPC svcgssd"
+               return
+       fi
+
+       # We need /proc/fs/nfsd mounted before starting svcgssd
+       if ! grep -q nfsd /proc/mounts ; then
+               modprobe nfsd > /dev/null 2>&1
+               run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
        fi
+       # Load rpcsec modules
+       for i in ${SECURE_NFS_MODS} ; do 
+               _modprobe single die $i
+       done
+       msg_starting "RPC svcgssd"
+       daemon /usr/sbin/rpc.svcgssd $RPCSVCGSSOPTIONS
+       RETVAL=$?
+       [ $RETVAL = 0 ] && touch /var/lock/subsys/svcgssd
 }
 
 stop() {
-       if [ -f /var/lock/subsys/svcgssd ]; then
-               msg_stopping "RPC svcgssd"
-               killproc rpc.svcgssd
-               rm -f /var/lock/subsys/svcgssd
-       else
+       if [ ! -f /var/lock/subsys/svcgssd ]; then
                msg_not_running "RPC svcgssd"
+               return
        fi
+
+       msg_stopping "RPC svcgssd"
+       killproc rpc.svcgssd
+       rm -f /var/lock/subsys/svcgssd
 }
 
 # See how we were called.
@@ -74,14 +76,14 @@ case "$1" in
   stop)
        stop
        ;;
-  status)
-       status rpc.svcgssd
-       RETVAL=$?
-       ;;
   restart|reload)
        stop
        start
        ;;
+  status)
+       status rpc.svcgssd
+       RETVAL=$?
+       ;;
   *)
        msg_usage "$0 {start|stop|restart|status}"
        exit 1
This page took 0.146351 seconds and 4 git commands to generate.