3 # udhcpc script edited by Tim Riker <Tim@Rikers.org>
5 [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
7 RESOLV_CONF
="/etc/resolv.conf"
8 [ -n "$broadcast" ] && BROADCAST
="broadcast $broadcast"
9 [ -n "$subnet" ] && NETMASK
="netmask $subnet"
13 /sbin
/ifconfig
$interface 0.0.0.0
17 /sbin
/ifconfig
$interface $ip $BROADCAST $NETMASK
19 if [ -n "$router" ] ; then
20 echo "deleting routers"
21 while route del default gw
0.0.0.0 dev
$interface ; do
26 route add default gw
$i dev
$interface
30 echo -n > $RESOLV_CONF
31 [ -n "$domain" ] && echo search
$domain >> $RESOLV_CONF
34 echo nameserver
$i >> $RESOLV_CONF
This page took 0.04224 seconds and 5 git commands to generate.