summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkdown
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/sbin/ppp-linkdown')
-rwxr-xr-xusr/local/sbin/ppp-linkdown11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index 87560f7..2ab0b6b 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -16,14 +16,9 @@ if [ "$3" != "" ]; then
pfctl -K ${LOCAL_IP}
fi
-OLD_ROUTER=`/bin/cat /tmp/${1}_router`
-if [ "${OLD_ROUTER}" != "" ]; then
- echo "Removing states to ${OLD_ROUTER}" | logger -t ppp-linkdown
- /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
-
- if [ -f "/tmp/${interface}_defaultgw" ]; then
- route delete default ${OLD_ROUTER}
- fi
+/sbin/pfctl -i $1 -k 0.0.0.0/0
+if [ -f "/tmp/${1}_defaultgw" ]; then
+ route delete default ${OLD_ROUTER}
fi
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown $1:
OpenPOWER on IntegriCloud