summaryrefslogtreecommitdiff
path: root/init.d/net.lo.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/net.lo.in')
-rw-r--r--init.d/net.lo.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index ae07b52..02d11a8 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -488,7 +488,9 @@ start()
{
local IFACE=${RC_SVCNAME#*.} oneworked=false fallback=false module=
local IFVAR=$(shell_var "${IFACE}") cmd= our_metric=
- local metric=0
+ local metric=0 _up_before_preup
+ eval _up_before_preup="\$up_before_preup_${IFVAR}"
+ [ -z "${_up_before_preup}" ] && _up_before_preup=$up_before_preup
einfo "Bringing up interface ${IFACE}"
eindent
@@ -502,7 +504,7 @@ start()
# available in preup and afterwards incase the user inadvertently
# brings it down
if [ "$(command -v preup)" = "preup" ]; then
- _up 2>/dev/null
+ [ "${_up_before_preup}" = "no" ] || _up 2>/dev/null
ebegin "Running preup"
eindent
preup || return 1