| # udhcpc script edited by Tim Riker <Tim@Rikers.org> |
| [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 |
| RESOLV_CONF="/etc/resolv.conf" |
| [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" |
| [ -n "$subnet" ] && NETMASK="netmask $subnet" |
| /sbin/ifconfig $interface 0.0.0.0 |
| /sbin/ifconfig $interface $ip $BROADCAST $NETMASK |
| if [ -n "$router" ] ; then |
| while route del default gw 0.0.0.0 dev $interface ; do |
| route add default gw $i dev $interface metric $((metric++)) |
| [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF |
| echo nameserver $i >> $RESOLV_CONF |