Project

General

Profile

Download (669 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2

    
3
# unset CGI environment variables so as not to confuse PHP
4
unset CONTENT_TYPE GATEWAY_INTERFACE REMOTE_USER REMOTE_ADDR AUTH_TYPE
5
unset HTTP_USER_AGENT CONTENT_LENGTH SCRIPT_FILENAME HTTP_HOST
6
unset SERVER_SOFTWARE HTTP_REFERER SERVER_PROTOCOL REQUEST_METHOD
7
unset SERVER_PORT SCRIPT_NAME SERVER_NAME
8

    
9
# write nameservers to file
10
if [ $6 = "dns1" ]; then
11
	echo $7 > /var/etc/nameserver_$1
12
	/sbin/route add $7 $4
13
fi
14

    
15
if [ $8 = "dns2" ]; then
16
	echo $9 >> /var/etc/nameserver_$1
17
	/sbin/route add $9 $4
18
fi
19

    
20
# let the configuration system know that the ip has changed.
21
/bin/echo $1 > /tmp/rc.newwanip
22
/bin/echo $4 > /tmp/$1_router
23
/usr/bin/touch /tmp/$1up
24
exit 0
(9-9/16)