diff options
author | Bill Nottingham <notting@redhat.com> | 2011-12-14 17:49:19 -0500 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2012-02-13 10:22:56 +0100 |
commit | 9f4a481197bc6d34e2d1757602479248f9878438 (patch) | |
tree | 2cce555ba840f857ade72bd9730e4ca8beffb99a /rc.d/init.d/network | |
parent | 1bfdac0e9eee83a97ba890c6b8a6d88ed73d45a7 (diff) | |
download | initscripts-9f4a481197bc6d34e2d1757602479248f9878438.tar initscripts-9f4a481197bc6d34e2d1757602479248f9878438.tar.gz initscripts-9f4a481197bc6d34e2d1757602479248f9878438.tar.bz2 initscripts-9f4a481197bc6d34e2d1757602479248f9878438.tar.xz initscripts-9f4a481197bc6d34e2d1757602479248f9878438.zip |
Add cifs to check for network filesystem (#760018).
Use findmnt to simplify the code.
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 76ea3c61..bb406438 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -166,10 +166,8 @@ case "$1" in # If this is a final shutdown/halt, check for network FS, # and unmount them even if the user didn't turn on netfs if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then - NFSMTAB=$(LC_ALL=C awk '$3 ~ /^nfs/ { 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) - if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then + NETMOUNTS=$(findmnt -m -t nfs,nfs4,smbfs,ncpfs,cifs 2>/dev/null) + if [ -n "$NETMOUNTS" ] ; then /etc/init.d/netfs stop fi fi |