summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkup
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/sbin/ppp-linkup')
-rwxr-xr-xusr/local/sbin/ppp-linkup13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index ff1157a..f850fa7 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,6 +1,6 @@
#!/bin/sh
-rm -f /var/etc/nameservers.conf
+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
@@ -9,11 +9,14 @@ unset SERVER_SOFTWARE HTTP_REFERER SERVER_PROTOCOL REQUEST_METHOD
unset SERVER_PORT SCRIPT_NAME SERVER_NAME
# write nameservers to file
-if [ "$6" = "dns1" ]; then
- /bin/echo $7 >> /var/etc/nameservers.conf
+if [ "$6" = "dns1" ]
+ echo $7 >> /var/etc/nameserver_$1
+ /sbin/route add $7 -if $1
fi
-if [ "$8" = "dns2" ]; then
- /bin/echo $9 >> /var/etc/nameservers.conf
+
+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.
OpenPOWER on IntegriCloud