Imported Debian patch 1.0.9-5
[nfs-utils.git] / debian / nfs-kernel-server.init
index 52913ae..81bd3f2 100644 (file)
@@ -26,8 +26,7 @@ DEFAULTFILE=/etc/default/nfs-kernel-server
 RPCNFSDCOUNT=8
 RPCNFSDPRIORITY=0
 RPCMOUNTDOPTS=
-NEED_SVCGSSD=yes
-RPCGSSDOPTS=
+NEED_SVCGSSD=no
 RPCSVCGSSDOPTS=
 PROCNFSD_MOUNTPOINT=/proc/fs/nfsd
 if [ -f $DEFAULTFILE ]; then
@@ -102,6 +101,16 @@ case "$1" in
                    RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"
 
                [ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
+       
+               if [ "$NEED_SVCGSSD" = "yes" ]; then
+                       log_progress_msg "svcgssd"
+                       start-stop-daemon --start --oknodo --quiet \
+                           --exec $PREFIX/sbin/rpc.svcgssd -- $RPCSVCGSSDOPTS
+                       if [ $? != 0 ]; then
+                               log_end_msg $?
+                               exit $?
+                       fi
+               fi
 
                log_progress_msg "mountd"
                start-stop-daemon --start --oknodo --quiet \
@@ -127,6 +136,16 @@ case "$1" in
                log_end_msg $?
                exit $?
        fi
+               
+       if [ "$NEED_SVCGSSD" = "yes" ]; then
+               log_progress_msg "svcgssd"
+               start-stop-daemon --stop --oknodo --quiet \
+                   --name rpc.svcgssd --user 0
+               if [ $? != 0 ]; then
+                       log_end_msg $?
+                       exit $?
+               fi
+       fi
 
        log_progress_msg "nfsd"
        start-stop-daemon --stop --oknodo --quiet \