2007-10-26 22:44:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
case $1 in
|
|
|
|
deconfig)
|
|
|
|
/sbin/ifconfig $interface up
|
|
|
|
/sbin/ifconfig $interface 0.0.0.0
|
|
|
|
;;
|
|
|
|
bound|renew)
|
2008-03-06 15:19:40 +00:00
|
|
|
echo $siaddr >> /tmp/dhcpserver
|
2007-10-26 22:44:33 +00:00
|
|
|
/sbin/ifconfig $interface $ip netmask $subnet
|
|
|
|
if [ -n "$router" ] ; then
|
2008-04-09 20:22:46 +00:00
|
|
|
while route del default gw 0.0.0.0 dev $interface > /dev/null 2>&1; do
|
2007-10-26 22:44:33 +00:00
|
|
|
:
|
|
|
|
done
|
|
|
|
|
|
|
|
for i in $router ; do
|
|
|
|
route add default gw $i dev $interface
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
echo -n > /etc/resolv.conf
|
|
|
|
[ -n "$domain" ] && echo search $domain >> /etc/resolv.conf
|
|
|
|
for i in $dns ; do
|
|
|
|
echo nameserver $i >> /etc/resolv.conf
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
esac
|