Project

General

Profile

Download (669 Bytes) Statistics
| Branch: | Tag: | Revision:
1 e1c8cdf5 Scott Ullrich
#!/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 5ca41f8b gnhb
if [ $6 = "dns1" ]; then
11 8f4f1e30 Ermal
	echo $7 > /var/etc/nameserver_$1
12 29533e50 Ermal
	/sbin/route add $7 $4
13 e1c8cdf5 Scott Ullrich
fi
14 1033de74 Ermal
15 5ca41f8b gnhb
if [ $8 = "dns2" ]; then
16 1033de74 Ermal
	echo $9 >> /var/etc/nameserver_$1
17 29533e50 Ermal
	/sbin/route add $9 $4
18 e1c8cdf5 Scott Ullrich
fi
19
20 28ec82f1 Ermal Luçi
# let the configuration system know that the ip has changed.
21
/bin/echo $1 > /tmp/rc.newwanip
22 b87364eb Ermal Luçi
/bin/echo $4 > /tmp/$1_router
23 6849a176 Ermal Luçi
/usr/bin/touch /tmp/$1up
24 1f0ddd30 Ermal
exit 0