Project

General

Profile

Download (501 Bytes) Statistics
| Branch: | Tag: | Revision:
1 e1c8cdf5 Scott Ullrich
#!/bin/sh
2
3
# write nameservers to file
4 5ca41f8b gnhb
if [ $6 = "dns1" ]; then
5 8f4f1e30 Ermal
	echo $7 > /var/etc/nameserver_$1
6 cfdf9444 Ermal
	/sbin/route delete $7
7 29533e50 Ermal
	/sbin/route add $7 $4
8 e1c8cdf5 Scott Ullrich
fi
9 1033de74 Ermal
10 5ca41f8b gnhb
if [ $8 = "dns2" ]; then
11 1033de74 Ermal
	echo $9 >> /var/etc/nameserver_$1
12 cfdf9444 Ermal
	/sbin/route delete $9
13 29533e50 Ermal
	/sbin/route add $9 $4
14 e1c8cdf5 Scott Ullrich
fi
15
16 28ec82f1 Ermal Luçi
# let the configuration system know that the ip has changed.
17 b87364eb Ermal Luçi
/bin/echo $4 > /tmp/$1_router
18 0c452870 Ermal
/bin/echo $3 > /tmp/$1_ip
19 6849a176 Ermal Luçi
/usr/bin/touch /tmp/$1up
20 0c452870 Ermal
/usr/local/sbin/pfSctl -c 'service reload dns'
21 04c528e7 Ermal
/usr/local/sbin/pfSctl -c "interface newip $1"
22 1f0ddd30 Ermal
exit 0