From 29693ecb7a031f6bacb74fd4dccfe0bdb1b1e5f8 Mon Sep 17 00:00:00 2001 From: Christian Ruppert Date: Wed, 21 Sep 2011 03:57:09 +0200 Subject: Refactoring of commit bf49e59e3eb4fe12167812bc1b4531742eddc383 Make sure the RPDB rules will be removed. --- net/iproute2.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/iproute2.sh b/net/iproute2.sh index 765294a..660d514 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -301,9 +301,6 @@ iproute2_post_start() iproute2_post_stop() { - # Only do something if the interface actually exist - _exists || return - # Kernel may not have IP built in if [ -e /proc/net/route ]; then local rules="$(service_get_value "ip_rule")" @@ -311,7 +308,11 @@ iproute2_post_stop() einfo "Removing RPDB rules" _ip_rule_runner del "${rules}" fi - ip route flush table cache dev "${IFACE}" + + # Only do something if the interface actually exist + if _exists; then + ip route flush table cache dev "${IFACE}" + fi fi # Don't delete sit0 as it's a special tunnel -- cgit v1.2.3