Ticket #195: iproute2-tent.diff

File iproute2-tent.diff, 648 bytes (added by roy.marples.name, 13 months ago)

5 second timeout

  • net/iproute2.sh

    diff --git a/net/iproute2.sh b/net/iproute2.sh
    index b1fe861..d983c9b 100644
    a b _iproute2_ipv6_tentative() 
    225225 
    226226iproute2_post_start() 
    227227{ 
     228        local n=5 
     229 
    228230        # Kernel may not have IP built in 
    229231        if [ -e /proc/net/route ]; then 
    230232                ip route flush table cache dev "${IFACE}" 
    iproute2_post_start() 
    232234 
    233235        if _iproute2_ipv6_tentative; then 
    234236                ebegin "Waiting for IPv6 addresses" 
    235                 while true; do 
     237                while [ $n -ge 0 ]; do 
    236238                        _iproute2_ipv6_tentative || break 
     239                        sleep 1 
     240                        n=$(($n - 1)) 
    237241                done 
    238                 eend 0 
     242                [ $n -ge 0 ] 
     243                eend $? 
    239244        fi 
     245 
     246        return 0 
    240247} 
    241248 
    242249iproute2_post_stop()