#!/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}