5 ip link
set $interface up
6 ip addr flush dev
$interface
9 netmask
=`ipnm2nwbc -v $ip $subnet | grep "^Network" | cut -d'/' -f2 | tr -d ' '`
10 ip addr add
$ip/$netmask dev
$interface
12 ip route add default via
$x dev
$interface
14 if [ "$UPDATE_RESOLVCONF" != 0 ]; then
15 touch /etc
/resolv.conf
16 if [ "$domain" ]; then
17 grep -v "^domain" /etc
/resolv.conf
> /tmp
/resolv.conf.$$
18 echo "domain $domain" >> /tmp
/resolv.conf.$$
19 cat /tmp
/resolv.conf.$$
> /etc
/resolv.conf
22 grep -v "^nameserver" /etc
/resolv.conf
> /tmp
/resolv.conf.$$
24 echo "nameserver $x" >> /tmp
/resolv.conf.$$
26 cat /tmp
/resolv.conf.$$
> /etc
/resolv.conf
28 rm -f /tmp
/resolv.conf.$$
32 echo "Unknown method $1"