diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-27 16:40:18 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-27 16:40:18 +0000 |
commit | f30714aabace8847a225899e9427cad86b7cb5c5 (patch) | |
tree | 8b6d82f2ff470e0edcade60d14855c7b095d2f7c /rc.d/init.d/netfs | |
parent | 1635b8ae87831cc4cd836ed75bd35cbe7c05fd43 (diff) | |
download | initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.gz initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.bz2 initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.xz initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.zip |
I'm going to go out on a limb and say that /proc/mounts *doesn't* have
comments.
Diffstat (limited to 'rc.d/init.d/netfs')
-rwxr-xr-x | rc.d/init.d/netfs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index b64c06b6..dc6f78e0 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -24,10 +24,10 @@ SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' / CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $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 }' /etc/mtab` -NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts` -SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { 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` +NFSMTAB=`LC_ALL=C awk '$3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts` +SMBMTAB=`LC_ALL=C awk '$3 == "smbfs" { 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` # See how we were called. case "$1" in @@ -45,8 +45,8 @@ case "$1" in ;; stop) # Unmount loopback stuff first - remaining=`LC_ALL=C awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` - devremaining=`LC_ALL=C awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` + remaining=`LC_ALL=C awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` + devremaining=`LC_ALL=C awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [ -n "$remaining" ] && { sig= retry=3 @@ -61,8 +61,8 @@ case "$1" in losetup $dev >/dev/null 2>&1 && \ action $"Detaching loopback device $dev: " losetup -d $dev done - remaining=`LC_ALL=C awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` - devremaining=`LC_ALL=C awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` + remaining=`LC_ALL=C awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` + devremaining=`LC_ALL=C awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 @@ -93,7 +93,7 @@ case "$1" in [ -n "$NFSMTAB" ] && { sig= retry=3 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '$3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then @@ -102,7 +102,7 @@ case "$1" in action $"Unmounting NFS filesystems: " umount -f -l $remaining fi sleep 2 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '$3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 |