diff options
author | Bill Nottingham <notting@redhat.com> | 2004-01-27 20:24:12 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2004-01-27 20:24:12 +0000 |
commit | 842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1 (patch) | |
tree | 69b762acd13b0a77d17d63e01774232a7e20a7da /rc.d/init.d/halt | |
parent | 3b07364ff801cfd96954ee148a067a3907aded9e (diff) | |
download | initscripts-842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1.tar initscripts-842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1.tar.gz initscripts-842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1.tar.bz2 initscripts-842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1.tar.xz initscripts-842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1.zip |
NFSv4 support (<chucklever@bigfoot.com>, <steved@redhat.com>)
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-x | rc.d/init.d/halt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 660834db..8d9c3846 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -148,6 +148,27 @@ devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/m done } +# Unmount RPC pipe file systems +sig= +retry=3 +remaining=`awk '!/^#/ && $3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` + +while [ -n "$remaining" -a "$retry" -gt 0 ] +do + if [ "$retry" -lt 3 ]; then + runcmd $"Unmounting pipe file systems (retry): " umount -f $remaining + else + runcmd $"Unmounting pipe file systems: " umount -f $remaining + fi + sleep 2 + remaining=`awk '!/^#/ && $3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` + [ -z "$remaining" ] && break + /sbin/fuser -k -m $sig $remaining >/dev/null + sleep 5 + retry=$(($retry-1)) + sig=-9 +done + sig= retry=3 remaining=`halt_get_remaining | sort -r` |