wok-stable diff busybox/stuff/udhcp.script @ rev 12002

clex: new icon
author Samuel Trassare <samuel_trassare@yahoo.com>
date Mon Mar 05 08:55:01 2012 -0800 (2012-03-05)
parents 1ed09465c0ae
children 15a917692a49
line diff
     1.1 --- a/busybox/stuff/udhcp.script	Wed Jul 07 20:55:53 2010 +0200
     1.2 +++ b/busybox/stuff/udhcp.script	Mon Mar 05 08:55:01 2012 -0800
     1.3 @@ -4,14 +4,19 @@
     1.4  
     1.5  [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
     1.6  
     1.7 -[ "$subnet" == "255.255.255.255" ] && subnet="255.255.0.0" # qemu weirdness
     1.8 +[ "$subnet" == "255.255.255.255" ] && subnet="255.255.0.0" # qemu/ipv6 weirdness
     1.9  RESOLV_CONF="/etc/resolv.conf"
    1.10  [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
    1.11  [ -n "$subnet" ] && NETMASK="netmask $subnet"
    1.12  
    1.13 +netfs()
    1.14 +{
    1.15 +	/bin/grep -qe '\(:.* /\|httpfs\)' /proc/mounts
    1.16 +}
    1.17 +
    1.18  case "$1" in
    1.19  	deconfig)
    1.20 -		/sbin/ifconfig $interface 0.0.0.0
    1.21 +		netfs || /sbin/ifconfig $interface 0.0.0.0
    1.22  		for i in /etc/ipdown.d/*; do
    1.23  			[ -x $i ] && $i $interface
    1.24  		done