diff options
Diffstat (limited to 'sbin')
-rwxr-xr-x | sbin/ppp-script | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/ppp-script b/sbin/ppp-script index 3f2ca5c..1749eb4 100755 --- a/sbin/ppp-script +++ b/sbin/ppp-script @@ -1,3 +1,19 @@ #!/bin/sh +# Set the router for this interface /sbin/ifconfig $2 | grep "$1" | awk '{ print $2 }' > /tmp/$2_router + +# Remove file if it exists +if [ -f /var/etc/nameserver_$2 ]; then + rm -f /var/etc/nameserver_$2 +fi + +# DNS1 +if [ "$3" != "" ]; then + echo $3 >> /var/etc/nameserver_$2 +fi + +# DNS2 +if [ "$4" != "DNS2" ]; then + echo $4 >> /var/etc/nameserver_$2 +fi
\ No newline at end of file |