wok-current rev 20069
busybox/udhcpc6: update script (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Sep 23 17:21:58 2017 +0200 (2017-09-23) |
parents | 3437359e0ac3 |
children | 121612c89805 |
files | busybox/stuff/udhcp.script |
line diff
1.1 --- a/busybox/stuff/udhcp.script Sat Sep 23 16:49:43 2017 +0200 1.2 +++ b/busybox/stuff/udhcp.script Sat Sep 23 17:21:58 2017 +0200 1.3 @@ -18,7 +18,7 @@ 1.4 logger "$0 interface=$interface ip=$ip ipv6=$ipv6 broadcast=$broadcast subnet=$subnet ipv6prefix=$ipv6prefix router=$router domain=$domain dns=$dns fqdn=$fqdn $@" 1.5 1.6 skip="$(sed "/skipdhcpip=/!d;s/.*skipdhcpip=\([^ ]*\).*/\1/" </proc/cmdline)" 1.7 -case " $skip " in *\ $ip\ *) exit 0;; esac 1.8 +case " $skip " in *\ ${ip:-$ipv6}\ *) exit 0;; esac 1.9 1.10 case "$1" in 1.11 deconfig) 1.12 @@ -33,7 +33,7 @@ 1.13 1.14 renew|bound) 1.15 ipv6mask=${ipv6prefix#*/} 1.16 - [ -n "$ip" ] || ip=$ipv6 1.17 + ip=${ip:-$ipv6} 1.18 if [ ${ip/:/} == $ip ]; then 1.19 ifconfig $interface $ip $BROADCAST $NETMASK 1.20 else 1.21 @@ -41,9 +41,7 @@ 1.22 fi 1.23 1.24 if [ -n "$router" ] ; then 1.25 - while route del default gw 0.0.0.0 $DEV ; do 1.26 - : 1.27 - done 1.28 + while route del default gw 0.0.0.0 $DEV ; do :; done 1.29 t= 1.30 [ ${ip/:/} != $ip ] && t="-A inet6" && ip -6 route flush $DEV 1.31 metric=0