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
This commit is contained in:
William Hubbs 2013-02-11 08:52:46 -06:00
parent bbc6b96a40
commit 1280b97749
3 changed files with 11 additions and 0 deletions

View File

@ -440,3 +440,6 @@
# # This function is mostly here for completeness... I haven't # # This function is mostly here for completeness... I haven't
# # thought of anything nifty to do with it yet ;-) # # thought of anything nifty to do with it yet ;-)
#} #}
# You should note that we don't stop the network at system shutdown by default.
# If you really need this, then set shutdown_network=YES

View File

@ -1242,3 +1242,6 @@
# # This function is mostly here for completeness... I haven't # # This function is mostly here for completeness... I haven't
# # thought of anything nifty to do with it yet ;-) # # thought of anything nifty to do with it yet ;-)
#} #}
# You should note that we don't stop the network at system shutdown by default.
# If you really need this, then set shutdown_network=YES

View File

@ -709,6 +709,11 @@ ${routes}"
stop() 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 IFACE=${RC_SVCNAME#*.} module=
local IFVAR=$(shell_var "${IFACE}") opts= local IFVAR=$(shell_var "${IFACE}") opts=