aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-01-04 11:37:07 -0500
committerBill Nottingham <notting@redhat.com>2011-01-04 11:37:53 -0500
commit328e7a968515028d5668a63e6f4851a9c8c7e4a3 (patch)
treed927d2d2e3a617e0270448060f8e5a3f84420d08 /rc.d
parentae55f2a2642c561a3548a660621c7b50307dd430 (diff)
downloadinitscripts-328e7a968515028d5668a63e6f4851a9c8c7e4a3.tar
initscripts-328e7a968515028d5668a63e6f4851a9c8c7e4a3.tar.gz
initscripts-328e7a968515028d5668a63e6f4851a9c8c7e4a3.tar.bz2
initscripts-328e7a968515028d5668a63e6f4851a9c8c7e4a3.tar.xz
initscripts-328e7a968515028d5668a63e6f4851a9c8c7e4a3.zip
Rework to handle bind-mounted cifs/ncpfs (#663140, <dmudrich@nospam.mudrichsystems.com>)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/netfs16
1 files changed, 12 insertions, 4 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 501a8cb0..8d9854fb 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -25,8 +25,8 @@ NCPFSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }'
NETDEVFSTAB=$(LC_ALL=C awk '!/^#/ && $4 ~/_netdev/ && $4 !~ /noauto/ { print $1 }' /etc/fstab)
NFSMTAB=$(LC_ALL=C awk '$3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts)
-CIFSMTAB=$(LC_ALL=C awk '$3 == "cifs" { print $2 }' /proc/mounts)
-NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts)
+CIFSMTAB=$(LC_ALL=C awk '$3 == "cifs" { print $2 }' /proc/mounts | tac)
+NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts | tac)
NETDEVMTAB=$(LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab)
# See how we were called.
@@ -117,8 +117,16 @@ case "$1" in
$"Unmounting NFS filesystems (retry): " \
"-f -l"
fi
- [ -n "$CIFSMTAB" ] && action $"Unmounting CIFS filesystems: " umount -a -t cifs
- [ -n "$NCPMTAB" ] && action $"Unmounting NCP filesystems: " umount -a -t ncp,ncpfs
+ if [ -n "$CIFSMTAB" ]; then
+ for MNT in $CIFSMTAB; do
+ action $"Unmounting CIFS filesystem: $MNT" umount "$MNT"
+ done
+ fi
+ if [ -n "$NCPMTAB" ]; then
+ for MNT in $NCPMTAB; do
+ action $"Unmounting NCP filesystem: $MNT" umount "$MNT"
+ done
+ fi
rm -f /var/lock/subsys/netfs
;;
status)