diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-02-27 10:51:26 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-02-27 10:51:26 +0100 |
commit | 08acc853d72d008aff9e07b3049bebad0c8daca6 (patch) | |
tree | 87af3206df4addc30fad25f2fb807e079e10d616 /rc.d/init.d/network | |
parent | 7bece496b8a09df3b15b4aad224bad0b074e2ad7 (diff) | |
download | initscripts-08acc853d72d008aff9e07b3049bebad0c8daca6.tar initscripts-08acc853d72d008aff9e07b3049bebad0c8daca6.tar.gz initscripts-08acc853d72d008aff9e07b3049bebad0c8daca6.tar.bz2 initscripts-08acc853d72d008aff9e07b3049bebad0c8daca6.tar.xz initscripts-08acc853d72d008aff9e07b3049bebad0c8daca6.zip |
network: report that we can't shut down network for root on netfs
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index ea3ce8f9..0c9b26d0 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -160,12 +160,11 @@ case "$1" in rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/" && $3 != "rootfs") { print $3; }}' /proc/mounts) rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab) - if [[ "$rootfs" == nfs* || "$rootopts" =~ _r?netdev ]] ; then + if [[ "$rootfs" == nfs* || "$rootopts" =~ _r?netdev ]] || systemctl show --property=RequiredBy -- -.mount | grep -q 'remote-fs.target' ; then + net_log $"rootfs is on network filesystem, leaving network up" exit 1 fi - systemctl show --property=RequiredBy -- -.mount | grep -q 'remote-fs.target' && exit 1 - vlaninterfaces="" vpninterfaces="" xdslinterfaces="" |