summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkup
blob: 67b083283794099b58c3d7575f3cd1c8ce4f2834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# write nameservers to file
if [ $6 = "dns1" ]; then
	echo $7 > /var/etc/nameserver_$1
	/sbin/route delete $7
	/sbin/route add $7 $4
fi

if [ $8 = "dns2" ]; then
	echo $9 >> /var/etc/nameserver_$1
	/sbin/route delete $9
	/sbin/route add $9 $4
fi

# let the configuration system know that the ip has changed.
/usr/local/sbin/pfSctl -c "'interface reload $1'"
/bin/echo $4 > /tmp/$1_router
/usr/bin/touch /tmp/$1up
exit 0
OpenPOWER on IntegriCloud