diff options
| author | Lukas Nykryn <lnykryn@redhat.com> | 2016-02-03 15:38:48 +0100 |
|---|---|---|
| committer | Lukas Nykryn <lnykryn@redhat.com> | 2016-02-03 15:38:48 +0100 |
| commit | de85d43aa699c7a4068667de062b110b0fd67841 (patch) | |
| tree | d9eea4cac7fc11452f655e871066cd0df92b529e /rc.d/init.d/netfs | |
| parent | 557d4f4a7127b51652e4f5f4349ac4d8d7132854 (diff) | |
| download | initscripts-de85d43aa699c7a4068667de062b110b0fd67841.tar initscripts-de85d43aa699c7a4068667de062b110b0fd67841.tar.gz initscripts-de85d43aa699c7a4068667de062b110b0fd67841.tar.bz2 initscripts-de85d43aa699c7a4068667de062b110b0fd67841.tar.xz initscripts-de85d43aa699c7a4068667de062b110b0fd67841.zip | |
netfs: only unmount loopback device mounted on top of netdev or with back-file on netdev
Diffstat (limited to 'rc.d/init.d/netfs')
| -rwxr-xr-x | rc.d/init.d/netfs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index 1ebcd9e9..0b343805 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -19,17 +19,8 @@ . /etc/init.d/functions . /etc/sysconfig/network -NFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab) -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) -GLUSTERFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "glusterfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab) -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) -GLUSTERFSMTAB=$(LC_ALL=C awk '$3 == "fuse.glusterfs" { print $2 }' /proc/mounts) -NETDEVMTAB=$(LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab) +__source_netdevs_fstab +__source_netdevs_mtab # See how we were called. case "$1" in @@ -107,7 +98,7 @@ case "$1" in stop) # Unmount loopback stuff first [ "$EUID" != "0" ] && exit 4 - __umount_loopback_loop + __umount_loopback_loop --netdev if [ -n "$NETDEVMTAB" ]; then __umount_loop '$4 ~ /_netdev/ && $2 != "/" {print $2}' \ /etc/mtab \ |
