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