1
|
#!/bin/sh
|
2
|
|
3
|
rm -f /var/etc/nameservers.conf
|
4
|
|
5
|
# unset CGI environment variables so as not to confuse PHP
|
6
|
unset CONTENT_TYPE GATEWAY_INTERFACE REMOTE_USER REMOTE_ADDR AUTH_TYPE
|
7
|
unset HTTP_USER_AGENT CONTENT_LENGTH SCRIPT_FILENAME HTTP_HOST
|
8
|
unset SERVER_SOFTWARE HTTP_REFERER SERVER_PROTOCOL REQUEST_METHOD
|
9
|
unset SERVER_PORT SCRIPT_NAME SERVER_NAME
|
10
|
|
11
|
# write nameservers to file
|
12
|
if [ "$6" = "dns1" ]; then
|
13
|
/bin/echo $7 >> /var/etc/nameservers.conf
|
14
|
fi
|
15
|
if [ "$8" = "dns2" ]; then
|
16
|
/bin/echo $9 >> /var/etc/nameservers.conf
|
17
|
fi
|
18
|
|
19
|
# let the configuration system know that the ip has changed.
|
20
|
/bin/echo $1 > /tmp/rc.newwanip
|
21
|
/bin/echo $4 > /tmp/$1_router
|
22
|
|