summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@G5.local>2009-10-26 12:43:46 -0400
committerScott Ullrich <sullrich@G5.local>2009-10-26 12:43:46 -0400
commit1d894eafbfc039a29d782dc8c1d7956f8e6489f2 (patch)
treea4827469eccdeec2b02afe2170f5f9614961b5e2 /sbin
parentd0c04c77547ad47dbe4a5cbafcadd890f4734daf (diff)
downloadpfsense-1d894eafbfc039a29d782dc8c1d7956f8e6489f2.zip
pfsense-1d894eafbfc039a29d782dc8c1d7956f8e6489f2.tar.gz
Switch over to handling DNS from ppp.linkup allowing mulitple 3G cards to coexist on the same box
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/ppp-script16
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
OpenPOWER on IntegriCloud