summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkdown
blob: 4d4db422ee58d6fa4e44cda2f2f513a17505b042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
if [ -f /tmp/$1up ] && [ -f /conf/$1.log ]; then
        seconds=$((`date -j +%s` - `/usr/bin/stat -f %m /tmp/$1up`))
        /usr/local/sbin/ppp-log-uptime.sh $seconds $1 &
fi
if [ -f "/tmp/${interface}_defaultgw" ]; then
	route delete default $4
fi
/sbin/pfctl -b $3 -b $4
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown $1:
/bin/rm -f /var/etc/nameserver_$1
# Do not remove gateway used during filter reload.
/bin/rm -f /tmp/$1_router
/bin/rm -f /tmp/$1up
/bin/rm -f /tmp/$1_ip
/usr/local/sbin/pfSctl -c 'service reload dns'
OpenPOWER on IntegriCloud