From 08acc853d72d008aff9e07b3049bebad0c8daca6 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Fri, 27 Feb 2015 10:51:26 +0100 Subject: network: report that we can't shut down network for root on netfs --- rc.d/init.d/network | 5 ++--- 1 file 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="" -- cgit v1.2.1