Project

General

Profile

Download (865 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2

    
3
IF="${1}"
4
LOCAL_IP="${3}"
5

    
6
if [ -f /tmp/${IF}up ] && [ -f /conf/${IF}.log ]; then
7
	seconds=$((`date -j +%s` - `/usr/bin/stat -f %m /tmp/${IF}up`))
8
	/usr/local/sbin/ppp-log-uptime.sh $seconds ${IF} &
9
fi
10

    
11
/etc/rc.kill_states ${IF} ${LOCAL_IP}
12

    
13
if [ -s "/tmp/${IF}_defaultgw" ]; then
14
	GW=`head -n 1 /tmp/${IF}_defaultgw`
15
	[ -n "${GW}" ] \
16
		&& /sbin/route delete default ${GW}
17
fi
18
# delete the node just in case mpd cannot do that
19
/usr/sbin/ngctl shutdown ${IF}:
20
if [ -f "/var/etc/nameserver_${IF}" ]; then
21
	# Remove old entries
22
	for nameserver in `cat /var/etc/nameserver_${IF}`; do
23
		/sbin/route delete ${nameserver} >/dev/null 2>&1
24
	done
25
	/bin/rm -f /var/etc/nameserver_${IF}
26
fi
27
# Do not remove gateway used during filter reload.
28
/bin/rm -f /tmp/${IF}_router
29
/bin/rm -f /tmp/${IF}up
30
/bin/rm -f /tmp/${IF}_ip
31
/usr/local/sbin/pfSctl -c 'service reload dns'
(10-10/18)