[oldnet] Bug #363959: Improve plug_timeout ifplugd/netplugd code.
- Add support for a global plug_timeout setting to match the documentation. - Update the documentation to also show per-interface configuration. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
parent
b6409feaac
commit
2d197357ef
@ -975,10 +975,12 @@
|
||||
# and you're done :)
|
||||
|
||||
# By default we don't wait for netplug/ifplugd to configure the interface.
|
||||
# If you would like it to wait so that other services know that network is up
|
||||
# then you can specify a timeout here.
|
||||
# If you would like it to wait so that other services know that network is
|
||||
# up then you can specify a timeout here. A value of 0 means wait forever,
|
||||
# and a negative value means never wait.
|
||||
#plug_timeout_eth0="10"
|
||||
# If you want to set it for all interfaces:
|
||||
#plug_timeout="10"
|
||||
# A value of 0 means wait forever.
|
||||
|
||||
# If you don't want to use netplug on a specific interface but you have it
|
||||
# installed, you can disable it for that interface via the modules statement
|
||||
|
@ -51,7 +51,9 @@ ifplugd_pre_start()
|
||||
|
||||
eindent
|
||||
|
||||
# IFACE-specific, then global, then default
|
||||
eval timeout=\$plug_timeout_${IFVAR}
|
||||
[ -z "${timeout}" ] && timeout=$plug_timeout
|
||||
[ -z "${timeout}" ] && timeout=-1
|
||||
if [ ${timeout} -eq 0 ]; then
|
||||
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
||||
|
@ -53,7 +53,9 @@ netplugd_pre_start()
|
||||
|
||||
eindent
|
||||
|
||||
# IFACE-specific, then global, then default
|
||||
eval timeout=\$plug_timeout_${IFVAR}
|
||||
[ -z "${timeout}" ] && timeout=$plug_timeout
|
||||
[ -z "${timeout}" ] && timeout=-1
|
||||
if [ ${timeout} -eq 0 ]; then
|
||||
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
||||
|
Loading…
Reference in New Issue
Block a user