summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-05-06 21:27:14 +0000
committerErmal <eri@pfsense.org>2011-05-06 21:27:14 +0000
commit5b06d9ccee67a8388ed2a215acf61e30620f45d7 (patch)
treedd2a9d1e1941d249acffd44048bc288a057e2db5 /usr/local/sbin
parent978cf4fd6ceba24c90e376ede3269c44ecde44b0 (diff)
downloadpfsense-5b06d9ccee67a8388ed2a215acf61e30620f45d7.zip
pfsense-5b06d9ccee67a8388ed2a215acf61e30620f45d7.tar.gz
Reorder instructions and do not reload dns if its not allowed from the dns allow override setting.
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ppp-linkup13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index 94d9b16..12dda9b 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,5 +1,10 @@
#!/bin/sh
+# let the configuration system know that the ip has changed.
+/bin/echo $4 > /tmp/$1_router
+/bin/echo $3 > /tmp/$1_ip
+/usr/bin/touch /tmp/$1up
+
ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l`
if [ $ALLOWOVERRIDE -gt 0 ]; then
# write nameservers to file
@@ -14,13 +19,9 @@ if [ $ALLOWOVERRIDE -gt 0 ]; then
/sbin/route delete $9
/sbin/route add $9 $4
fi
+ /usr/local/sbin/pfSctl -c 'service reload dns'
+ /bin/sleep 1
fi
-# let the configuration system know that the ip has changed.
-/bin/echo $4 > /tmp/$1_router
-/bin/echo $3 > /tmp/$1_ip
-/usr/bin/touch /tmp/$1up
-/usr/local/sbin/pfSctl -c 'service reload dns'
-/bin/sleep 1
/usr/local/sbin/pfSctl -c "interface newip $1"
exit 0
OpenPOWER on IntegriCloud