diff options
Diffstat (limited to 'net-scripts/net.modules.d/ifplugd')
-rw-r--r-- | net-scripts/net.modules.d/ifplugd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net-scripts/net.modules.d/ifplugd b/net-scripts/net.modules.d/ifplugd index 818969e..edeefe9 100644 --- a/net-scripts/net.modules.d/ifplugd +++ b/net-scripts/net.modules.d/ifplugd @@ -29,7 +29,7 @@ ifplugd_check_installed() { # # Start ifplugd on an interface ifplugd_pre_start() { - local iface="$1" ifvar=$( bash_variable "$1" ) timeout i opts + local iface="$1" ifvar=$( bash_variable "$1" ) timeout opts local pidfile="/var/run/ifplugd.${iface}.pid" # We don't start ifplugd if we're being called from the background @@ -104,7 +104,7 @@ ifplugd_pre_start() { veinfo "Waiting for ${iface} to be marked as started" - i=0 + local i=0 while true ; do if service_started "net.${iface}"; then local addr=$( interface_get_address "${iface}" ) @@ -112,6 +112,7 @@ ifplugd_pre_start() { exit 0 fi sleep 1 + [[ ${timeout} == "0" ]] && continue (( i++ )) [[ ${i} == "${timeout}" || ${i} -gt "${timeout}" ]] && break done |