aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-01-27 20:24:12 +0000
committerBill Nottingham <notting@redhat.com>2004-01-27 20:24:12 +0000
commit842261ee6fc9d8e3f2f9339b22efdc8328d7b8d1 (patch)
tree69b762acd13b0a77d17d63e01774232a7e20a7da
parent3b07364ff801cfd96954ee148a067a3907aded9e (diff)
downloadinitscripts-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>)
-rwxr-xr-xrc.d/init.d/halt21
-rwxr-xr-xrc.d/init.d/netfs12
-rwxr-xr-xrc.d/rc.sysinit4
3 files changed, 29 insertions, 8 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`
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 204e262b..2523e8ff 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -19,11 +19,11 @@
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
-NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
+NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $4 !~ /noauto/ { print $2 }' /etc/fstab`
SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NCPFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NETDEVMTAB=`LC_ALL=C awk '!/^#/ && $4 ~ /_netdev/ && $2 != "/" { print $2 }' /proc/mounts`
-NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 == "nfs" && $2 != "/" { print $2 }' /proc/mounts`
+NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" { print $2 }' /proc/mounts`
SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { print $2 }' /proc/mounts`
NCPMTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" { print $2 }' /proc/mounts`
@@ -33,12 +33,12 @@ case "$1" in
[ -n "$NFSFSTAB" ] &&
{
[ ! -f /var/lock/subsys/portmap ] && service portmap start
- action $"Mounting NFS filesystems: " mount -a -t nfs
+ action $"Mounting NFS filesystems: " mount -a -t nfs,nfs4
}
[ -n "$SMBFSTAB" ] && action $"Mounting SMB filesystems: " mount -a -t smbfs
[ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs
touch /var/lock/subsys/netfs
- action $"Mounting other filesystems: " mount -a -t nonfs,smbfs,ncpfs
+ action $"Mounting other filesystems: " mount -a -t nonfs,nonfs4,smbfs,ncpfs
;;
stop)
# Unmount loopback stuff first
@@ -94,9 +94,9 @@ case "$1" in
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
if [ "$retry" -lt 3 ]; then
- action $"Unmounting NFS filesystems (retry): " umount -f -l -a -t nfs
+ action $"Unmounting NFS filesystems (retry): " umount -f -l -a -t nfs,nfs4
else
- action $"Unmounting NFS filesystems: " umount -f -l -a -t nfs
+ action $"Unmounting NFS filesystems: " umount -f -l -a -t nfs,nfs4
fi
sleep 2
remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts`
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 63ca7681..25f35cd2 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -260,7 +260,7 @@ fi
_RUN_QUOTACHECK=0
ROOTFSTYPE=`awk '/ \/ / && ($3 !~ /rootfs/) { print $3 }' /proc/mounts`
-if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then
+if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$ROOTFSTYPE" != "Xnfs4" ]; then
STRING=$"Checking root filesystem"
echo $STRING
@@ -582,7 +582,7 @@ fi
# Mount all other filesystems (except for NFS and /proc, which is already
# mounted). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode.
-action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O no_netdev
+action $"Mounting local filesystems: " mount -a -t nonfs,nonfs4,smbfs,ncpfs -O no_netdev
# Start the graphical boot, if necessary and not done yet.
if fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then