Unquote ${ZPOOL_FORCE} variable usage.
[genkernel.git] / defaults / udhcpc.scripts
old mode 100644 (file)
new mode 100755 (executable)
index 1890f8a..53aa2cc
@@ -1,16 +1,21 @@
 #!/bin/sh
 
+[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
+
 case ${1} in
-       bound)
+       renew|bound)
                [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
                [ -n "$subnet" ] && NETMASK="netmask $subnet"
                [ -n "$rootpath" ] && echo "$rootpath" > /rootpath
-               #[ -n "$router" ] && echo "$router" > /router
-               #[ -n "$dns" ] && echo "$dns" > /dns
+               [ -n "$hostname" ] && hostname ${hostname}
 
                busybox ifconfig $interface $ip $BROADCAST $NETMASK
                if [ -n "${router}" ]
                then
+                       while route del default gw 0.0.0.0 dev $interface; do
+                               :
+                       done
+
                        for i in ${router}
                        do
                                busybox route add default gw ${i}