Project

General

Profile

Download (646 Bytes) Statistics
| Branch: | Tag: | Revision:
1 e1c8cdf5 Scott Ullrich
#!/bin/sh
2
3 5b06d9cc Ermal
# 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
8 a73a9886 Ermal
ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l`
9
if [ $ALLOWOVERRIDE -gt 0 ]; then
10
	# write nameservers to file
11
	if [ $6 = "dns1" ]; then
12
		echo $7 > /var/etc/nameserver_$1
13
		/sbin/route delete $7
14
		/sbin/route add $7 $4
15
	fi
16 1033de74 Ermal
17 a73a9886 Ermal
	if [ $8 = "dns2" ]; then
18
		echo $9 >> /var/etc/nameserver_$1
19
		/sbin/route delete $9
20
		/sbin/route add $9 $4
21
	fi
22 5b06d9cc Ermal
	/usr/local/sbin/pfSctl -c 'service reload dns'
23
	/bin/sleep 1
24 e1c8cdf5 Scott Ullrich
fi
25
26 04c528e7 Ermal
/usr/local/sbin/pfSctl -c "interface newip $1"
27 1f0ddd30 Ermal
exit 0