summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ppp-linkdown6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index 54807ac..62d07ed 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -10,8 +10,10 @@ fi
/etc/rc.kill_states ${IF} ${LOCAL_IP}
-if [ -f "/tmp/${IF}_defaultgw" ]; then
- /sbin/route delete default `/usr/bin/head -n 1 /tmp/${IF}_defaultgw`;
+if [ -s "/tmp/${IF}_defaultgw" ]; then
+ GW=`head -n 1 /tmp/${IF}_defaultgw`
+ [ -n "${GW}" ] \
+ && /sbin/route delete default ${GW}
fi
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown ${IF}:
OpenPOWER on IntegriCloud