summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkup
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-04-29 18:19:57 +0000
committerErmal <eri@pfsense.org>2011-04-29 18:19:57 +0000
commita73a9886e7ca043efa3e8d6ea8cfb3611ae95aa3 (patch)
treef011e044fdd2fafdc65c73bed3a7ef5ee6da42b1 /usr/local/sbin/ppp-linkup
parente5f3359c330ba735f17866a33a30e154d5fdfa37 (diff)
downloadpfsense-a73a9886e7ca043efa3e8d6ea8cfb3611ae95aa3.zip
pfsense-a73a9886e7ca043efa3e8d6ea8cfb3611ae95aa3.tar.gz
Ticket #1408. Honor the allow override settings even for ppp devices.
Diffstat (limited to 'usr/local/sbin/ppp-linkup')
-rwxr-xr-xusr/local/sbin/ppp-linkup23
1 files changed, 13 insertions, 10 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index a9c0f32..94d9b16 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,16 +1,19 @@
#!/bin/sh
-# write nameservers to file
-if [ $6 = "dns1" ]; then
- echo $7 > /var/etc/nameserver_$1
- /sbin/route delete $7
- /sbin/route add $7 $4
-fi
+ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l`
+if [ $ALLOWOVERRIDE -gt 0 ]; then
+ # write nameservers to file
+ if [ $6 = "dns1" ]; then
+ echo $7 > /var/etc/nameserver_$1
+ /sbin/route delete $7
+ /sbin/route add $7 $4
+ fi
-if [ $8 = "dns2" ]; then
- echo $9 >> /var/etc/nameserver_$1
- /sbin/route delete $9
- /sbin/route add $9 $4
+ if [ $8 = "dns2" ]; then
+ echo $9 >> /var/etc/nameserver_$1
+ /sbin/route delete $9
+ /sbin/route add $9 $4
+ fi
fi
# let the configuration system know that the ip has changed.
OpenPOWER on IntegriCloud