summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkdown
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-09-15 19:47:39 +0000
committerErmal <eri@pfsense.org>2010-09-15 19:47:39 +0000
commit04c528e72b89123b129f343db8195213743d238e (patch)
treee0020c73b1268334630d377a89bd561735b37272 /usr/local/sbin/ppp-linkdown
parent0c452870cdc2816749f4b1c12370a3d6a64158d5 (diff)
downloadpfsense-04c528e72b89123b129f343db8195213743d238e.zip
pfsense-04c528e72b89123b129f343db8195213743d238e.tar.gz
Ticket #876. Actually the event to send is interface newip $ip rather interface configure! also use the fact that now we have a /tmp/$if_defaultgw rather than relying in route get default which might block.
Diffstat (limited to 'usr/local/sbin/ppp-linkdown')
-rwxr-xr-xusr/local/sbin/ppp-linkdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index 55be9d6..4d4db42 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -3,6 +3,9 @@ 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:
OpenPOWER on IntegriCloud