Add ifdown_eth0=NO so that the interface stays up for WakeOnLan, Gentoo #220875

This commit is contained in:
Roy Marples 2008-05-09 10:29:06 +00:00
parent a854fe6d61
commit 766ec96e3d
3 changed files with 16 additions and 3 deletions

View File

@ -87,6 +87,10 @@
# is how long we wait for carrier. The current default is 3 seconds # is how long we wait for carrier. The current default is 3 seconds
#carrier_timeout_eth0=-1 #carrier_timeout_eth0=-1
# You may wish to disable the interface being brought down when stopping.
# This is only of use for WakeOnLan.
#ifdown_eth0="NO"
############################################################################## ##############################################################################
# OPTIONAL MODULES # OPTIONAL MODULES

View File

@ -120,6 +120,10 @@
# tables you may have to set a global metric as the due to a simple read of # tables you may have to set a global metric as the due to a simple read of
# the routing table taking over a minute at a time. # the routing table taking over a minute at a time.
# You may wish to disable the interface being brought down when stopping.
# This is only of use for WakeOnLan.
#ifdown_eth0="NO"
############################################################################## ##############################################################################
# OPTIONAL MODULES # OPTIONAL MODULES

View File

@ -663,9 +663,14 @@ stop()
fi fi
done done
! yesno ${IN_BACKGROUND} && \ # If not in background, and not loopback then bring the interface down
[ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] && \ # unless overridden.
_down 2>/dev/null if ! yesno ${IN_BACKGROUND} && \
[ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
eval module=\$ifdown_${IFVAR}
module=${module:-YES}
yesno ${module} && _down 2>/dev/null
fi
type resolvconf >/dev/null 2>&1 && resolvconf -d "${IFACE}" 2>/dev/null type resolvconf >/dev/null 2>&1 && resolvconf -d "${IFACE}" 2>/dev/null