]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - lib/ifup
- add support for CHECK_LINK_WAIT_TIMEOUT config variable (wait max x sec for interfa...
[projects/rc-scripts.git] / lib / ifup
index b0c03f57acf94f2ee00e4986f0c6d7dc4fc1d924..dee4e58b6a45075531518bedc6a544f150e0f2f8 100755 (executable)
--- a/lib/ifup
+++ b/lib/ifup
@@ -176,7 +176,8 @@ if [ -n "$BOOTPROTO" -a "$BOOTPROTO" != "none" -a "$BOOTPROTO" != "static" ]; th
                fi
                DHCP_ARGS="$DHCP_OPTIONS $DHCP_ARGS"
 
-               if check_link_down ${DEVICE}; then
+               [ -z "$CHECK_LINK_WAIT_TIMEOUT" ] && CHECK_LINK_WAIT_TIMEOUT=5
+               if check_link_down ${DEVICE} $(( $CHECK_LINK_WAIT_TIMEOUT * 2 )); then
                        run_cmd "$(nls 'Determining IP information for %s (%s)' "$DEVICE" "${DHCP_CLIENT##*/}")" /bin/false
                        nls '%s: Check cable/radio on-off switch?' "$DEVICE"
                        exit 1
This page took 0.064492 seconds and 4 git commands to generate.