]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- add support for CHECK_LINK_WAIT_TIMEOUT config variable (wait max x sec for interfa...
authorAdam Osuchowski <adwol@pld-linux.org>
Sat, 23 Dec 2017 12:30:02 +0000 (13:30 +0100)
committerAdam Osuchowski <adwol@pld-linux.org>
Sat, 23 Dec 2017 12:30:02 +0000 (13:30 +0100)
lib/ifup
sysconfig/interfaces/ifcfg-description

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
index 1629ce0df030c4ae7bbdf26d5700db7c69e23260..45d5a704b81b146e63c2debba9990006b4f77595 100644 (file)
@@ -81,6 +81,8 @@ VLAN_REORDER_HDR=[0|1]        When this is set, the VLAN device will move the
 [ HANDLING=0|1|2|3 ] (0 is default; used ie. in ATM configuration, for
                      details see ifup script)
 
+[ CHECK_LINK_WAIT_TIMEOUT=<wait max x sec for interface link up> ]
+
 if     DEVICE=eth*; then
 
        [ MEDIA={auto|10baseT|10base2|AUI} ]
This page took 0.541905 seconds and 4 git commands to generate.