Project

General

Profile

Download (604 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
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

    
8
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 change $7 $4
14
	fi
15

    
16
	if [ $8 = "dns2" ]; then
17
		echo $9 >> /var/etc/nameserver_$1
18
		/sbin/route change $9 $4
19
	fi
20
	/usr/local/sbin/pfSctl -c 'service reload dns'
21
	/bin/sleep 1
22
fi
23

    
24
/usr/local/sbin/pfSctl -c "interface newip $1"
25
exit 0
(8-8/13)