Project

General

Profile

« Previous | Next » 

Revision 5b06d9cc

Added by Ermal LUÇI about 14 years ago

Reorder instructions and do not reload dns if its not allowed from the dns allow override setting.

View differences:

usr/local/sbin/ppp-linkup
1 1
#!/bin/sh
2 2

  
3
# let the configuration system know that the ip has changed.
4
/bin/echo $4 > /tmp/$1_router
5
/bin/echo $3 > /tmp/$1_ip
6
/usr/bin/touch /tmp/$1up
7

  
3 8
ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l`
4 9
if [ $ALLOWOVERRIDE -gt 0 ]; then
5 10
	# write nameservers to file
......
14 19
		/sbin/route delete $9
15 20
		/sbin/route add $9 $4
16 21
	fi
22
	/usr/local/sbin/pfSctl -c 'service reload dns'
23
	/bin/sleep 1
17 24
fi
18 25

  
19
# let the configuration system know that the ip has changed.
20
/bin/echo $4 > /tmp/$1_router
21
/bin/echo $3 > /tmp/$1_ip
22
/usr/bin/touch /tmp/$1up
23
/usr/local/sbin/pfSctl -c 'service reload dns'
24
/bin/sleep 1
25 26
/usr/local/sbin/pfSctl -c "interface newip $1"
26 27
exit 0

Also available in: Unified diff