3 ip
=/nyan
/iproute
2/current
/sbin
/ip
4 rm=/nyan
/coreutils
/current
/bin
/rm
6 if test $reason = PREINIT
; then
7 $ip link
set $interface down
8 $ip addr flush dev
$interface
9 $ip link
set $interface up
13 # I'm not into it, but I guess RENEW and maybe REBIND do not need full
14 # reconfiguration of the network interface
15 if test $reason = BOUND
-o $reason = RENEW
-o $reason = REBIND
-o $reason = REBOOT
; then
16 $ip link
set $interface down
17 $ip addr flush dev
$interface
18 $ip addr add
$new_ip_address/$new_subnet_mask broadcast
$new_broadcast_address dev
$interface
19 $ip link
set $interface up
20 $ip route add default via
$new_routers dev
$interface
22 $rm -f /etc
/resolv.conf
23 for n
in $new_domain_name_servers
25 echo "nameserver $n" >>/etc
/resolv.conf
30 $ip link
set $interface down
31 $ip addr flush dev
$interface