Last change
on this file since 1169 was 584, checked in by bcornec, 18 years ago |
Modes adjusted again for mindi (udhcp issue)
|
-
Property svn:executable
set to
*
|
File size:
846 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 |
|
---|
3 | # udhcpc script edited by Tim Riker <Tim@Rikers.org>
|
---|
4 |
|
---|
5 | [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
---|
6 |
|
---|
7 | RESOLV_CONF="/etc/resolv.conf"
|
---|
8 | [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
---|
9 | [ -n "$subnet" ] && NETMASK="netmask $subnet"
|
---|
10 |
|
---|
11 | case "$1" in
|
---|
12 | deconfig)
|
---|
13 | /sbin/ifconfig $interface 0.0.0.0
|
---|
14 | ;;
|
---|
15 |
|
---|
16 | renew|bound)
|
---|
17 | /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
---|
18 |
|
---|
19 | if [ -n "$router" ] ; then
|
---|
20 | echo "deleting routers"
|
---|
21 | while /sbin/route del default gw 0.0.0.0 dev $interface ; do
|
---|
22 | :
|
---|
23 | done
|
---|
24 |
|
---|
25 | metric=0
|
---|
26 | for i in $router ; do
|
---|
27 | /sbin/route add default gw $i dev $interface metric $((metric++))
|
---|
28 | done
|
---|
29 | fi
|
---|
30 |
|
---|
31 | echo -n > $RESOLV_CONF
|
---|
32 | [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
|
---|
33 | for i in $dns ; do
|
---|
34 | echo adding dns $i
|
---|
35 | echo nameserver $i >> $RESOLV_CONF
|
---|
36 | done
|
---|
37 | ;;
|
---|
38 | esac
|
---|
39 |
|
---|
40 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.