aboutsummaryrefslogtreecommitdiff
path: root/examples/udhcp/sample.renew
diff options
context:
space:
mode:
Diffstat (limited to 'examples/udhcp/sample.renew')
-rwxr-xr-xexamples/udhcp/sample.renew8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/udhcp/sample.renew b/examples/udhcp/sample.renew
index efd98cf15..15a7775e9 100755
--- a/examples/udhcp/sample.renew
+++ b/examples/udhcp/sample.renew
@@ -6,12 +6,12 @@ RESOLV_CONF="/etc/udhcpc/resolv.conf"
6[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" 6[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
7[ -n "$subnet" ] && NETMASK="netmask $subnet" 7[ -n "$subnet" ] && NETMASK="netmask $subnet"
8 8
9/sbin/ifconfig $interface $ip $BROADCAST $NETMASK 9ifconfig $interface $ip $BROADCAST $NETMASK
10 10
11if [ -n "$router" ] 11if [ -n "$router" ]
12then 12then
13 echo "deleting routers" 13 echo "deleting routers"
14 while /sbin/route del default gw 0.0.0.0 dev $interface 14 while route del default gw 0.0.0.0 dev $interface
15 do : 15 do :
16 done 16 done
17 17
@@ -23,9 +23,9 @@ then
23 # /32 instructs kernel to always use routing for all outgoing packets 23 # /32 instructs kernel to always use routing for all outgoing packets
24 # (they can never be sent to local subnet - there is no local subnet for /32). 24 # (they can never be sent to local subnet - there is no local subnet for /32).
25 # Used in datacenters, avoids the need for private ip-addresses between two hops. 25 # Used in datacenters, avoids the need for private ip-addresses between two hops.
26 /sbin/ip route add $i dev $interface 26 ip route add $i dev $interface
27 fi 27 fi
28 /sbin/route add default gw $i dev $interface metric $((metric++)) 28 route add default gw $i dev $interface metric $((metric++))
29 done 29 done
30fi 30fi
31 31