From 5b06d9ccee67a8388ed2a215acf61e30620f45d7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 6 May 2011 21:27:14 +0000 Subject: Reorder instructions and do not reload dns if its not allowed from the dns allow override setting. --- usr/local/sbin/ppp-linkup | 13 +++++++------ 1 file 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 -- cgit v1.1