OBS User unknown
2008-11-28 14:43:06 +00:00
committed by Git OBS Bridge
parent c3304deef5
commit 6b5d1a1645
4 changed files with 89 additions and 27 deletions

View File

@@ -131,20 +131,6 @@ mount_usr() {
done
}
close_usr() {
test -n "$usr" -o -n "$opt" -o -n "$mnt" || return
local -i proc=0
local where
for where in $usr $opt $mnt ; do
fuser -skm -TERM $where && let proc++
done
test $proc -eq 0 && return
sleep 5
for where in $usr $opt $mnt ; do
fuser -skm -KILL $where
done
}
do_start_gssd() {
for flavor in $flavors; do
/sbin/modprobe rpcsec_gss_$flavor
@@ -244,17 +230,16 @@ case "$1-$nfs" in
stop-yes)
echo -n "Shutting down NFS client services:"
# in case we have /usr and/or /opt via nfs terminate all
# processes on them (nfsservers shouldn't do /usr via nfs)
case "$RUNLEVEL" in
[016sS]) close_usr ;;
esac
rootfs=`awk '$2 == "/" && $1 != "rootfs" {print $3}' /proc/mounts`
if test x$rootfs = xnfs ; then
echo -n " root filesystem is on NFS"
rc_status -s
else
#
# Unmount background because during long timeouts
#
if test "$nfs" = yes ; then
umount -alt nfs,nfs4 &
umount -alt nfs,nfs4
fi
# stop gssd
@@ -273,16 +258,19 @@ case "$1-$nfs" in
rm -f $IDMAPD_CLIENT_STATE
fi
# stop rpc.statd
# stop rpc.statd if not needed by server
if checkproc $STATD_BIN ; then
echo -n " rpc.statd"
killproc $STATD_BIN
if [ `cat /proc/fs/nfsd/threads 2> /dev/null`0 -eq 0 ]; then
echo -n " rpc.statd"
killproc $STATD_BIN
fi
fi
umount_rpc_pipefs
#
rc_status -v
fi
;;
restart*|force-reload*)
## Stop the service and regardless of whether it was