From 1d894eafbfc039a29d782dc8c1d7956f8e6489f2 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 26 Oct 2009 12:43:46 -0400 Subject: Switch over to handling DNS from ppp.linkup allowing mulitple 3G cards to coexist on the same box --- sbin/ppp-script | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sbin/ppp-script') 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 -- cgit v1.1