From 2eaa9d1e7b682ce895d56966d9178dcfa0c822b1 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Mon, 4 Dec 2017 03:16:22 -0800 Subject: network: add knob to optionally keep interfaces up during shutdown (#154) * network: add knob to optionally keep interfaces up during shutdown --- rc.d/init.d/network | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rc.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 92da47db..7e4b2b1b 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -167,6 +167,15 @@ stop) exit 1 fi + # Don't shut the network down when shutting down the system if configured + # as such in sysconfig + if is_false "$IFDOWN_ON_SHUTDOWN"; then + if systemctl is-system-running | grep -q 'stopping'; then + net_log $"system is shutting down, leaving interfaces up as requested" + exit 1 + fi + fi + vlaninterfaces="" vpninterfaces="" xdslinterfaces="" -- cgit v1.2.1