grep -q nfsd /proc/filesystems && \
! grep -q nfsd /proc/mounts; then
run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
+ grep -q rpc_pipefs /proc/filesystems && \
+ ! grep -q rpc_pipefs /proc/mounts; then
+ run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
fi
msg_starting "NFS"
daemon /usr/sbin/exportfs -r
msg_starting "NFS mountd"
daemon rpc.mountd $RPCMOUNTOPTIONS
+ if (grep -q nfs4 /proc/filesystems); then
+ msg_starting "NFS idmapd"
+ daemon rpc.idmapd $RPCIDMAPOPTIONS
+ msg_starting "NFS svcgssd"
+ daemon rpc.svcgssd $RPCSVCGSSOPTIONS
+ fi
msg_starting "NFS daemon"
daemon rpc.nfsd $RPCNFSDCOUNT
fi
killproc rpc.mountd
msg_stopping "NFS daemon"
killproc nfsd -QUIT
+ if (grep -q nfs4 /proc/filesystems); then
+ msg_stopping "NFS svcgssd"
+ killproc rpc.svcgssd
+ msg_stopping "NFS idmapd"
+ killproc rpc.idmapd
+ fi
msg_stopping "NFS"
daemon /usr/sbin/exportfs -au
fi
# See how we were called.
case "$1" in
start)
- run_cmd "Mounting NFS filesystems" mount -a -t nfs
- touch /var/lock/subsys/nfsfs
+ if [ ! -f /var/lock/subsys/nfsfs ]; then
+ if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
+ msg_starting "NFS idmapd"
+ daemon rpc.cidmapd $RPCIDMAPOPTIONS
+ msg_starting "NFS gssd"
+ daemon rpc.gssd $RPCGSSOPTIONS
+ fi
+ run_cmd "Mounting NFS filesystems" mount -a -t nfs
+ touch /var/lock/subsys/nfsfs
+ else
+ msg_already_running "NFSFS"
+ fi
;;
stop)
if [ -f /proc/mounts ]; then
retry=$(($retry-1))
done
ok
+ if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
+ msg_stopping "NFS gssd"
+ killproc rpc.gssd
+ msg_stopping "NFS idmapd"
+ killproc rpc.cidmapd
+ fi
rm -f /var/lock/subsys/nfsfs
;;
status)