summaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-02-11 08:52:46 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-02-11 09:08:34 -0600
commit1280b97749ec60b4cd3f77d1c68202f305ad79b4 (patch)
treee68daffb6b828c2422d7a040540ae36e65850433 /init.d
parentbbc6b96a4012b0ec176bd1e082642c12612e88cb (diff)
downloadopenrc-1280b97749ec60b4cd3f77d1c68202f305ad79b4.tar.gz
openrc-1280b97749ec60b4cd3f77d1c68202f305ad79b4.tar.bz2
openrc-1280b97749ec60b4cd3f77d1c68202f305ad79b4.tar.xz
oldnet: add support for shutdown_network from newnet
This setting, already in use in newnet, allows the user to control whether network interfaces are stopped when the system shuts down. By default, under newnet, they are not, so I am making oldnet have the same default. A side-affect of this is that in the default configuration this fixes bugs like the one below. Reported-by: jerryfleming2006@gmail.com X-Gentoo-Bug: 259183 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=259183
Diffstat (limited to 'init.d')
-rw-r--r--init.d/net.lo.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index fbc0124..10a7cb6 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -709,6 +709,11 @@ ${routes}"
stop()
{
+ # Don't stop the network at shutdown.
+ # We don't use the noshutdown keyword so that we are started again
+ # correctly if we go back to multiuser.
+ yesno ${shutdown_network:-YES} && yesno $RC_GOINGDOWN && return 0
+
local IFACE=${RC_SVCNAME#*.} module=
local IFVAR=$(shell_var "${IFACE}") opts=