Refactoring of commit bf49e59e3e
Make sure the RPDB rules will be removed.
This commit is contained in:
parent
930f4021b1
commit
29693ecb7a
@ -301,9 +301,6 @@ iproute2_post_start()
|
|||||||
|
|
||||||
iproute2_post_stop()
|
iproute2_post_stop()
|
||||||
{
|
{
|
||||||
# Only do something if the interface actually exist
|
|
||||||
_exists || return
|
|
||||||
|
|
||||||
# Kernel may not have IP built in
|
# Kernel may not have IP built in
|
||||||
if [ -e /proc/net/route ]; then
|
if [ -e /proc/net/route ]; then
|
||||||
local rules="$(service_get_value "ip_rule")"
|
local rules="$(service_get_value "ip_rule")"
|
||||||
@ -311,8 +308,12 @@ iproute2_post_stop()
|
|||||||
einfo "Removing RPDB rules"
|
einfo "Removing RPDB rules"
|
||||||
_ip_rule_runner del "${rules}"
|
_ip_rule_runner del "${rules}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Only do something if the interface actually exist
|
||||||
|
if _exists; then
|
||||||
ip route flush table cache dev "${IFACE}"
|
ip route flush table cache dev "${IFACE}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Don't delete sit0 as it's a special tunnel
|
# Don't delete sit0 as it's a special tunnel
|
||||||
if [ "${IFACE}" != "sit0" ]; then
|
if [ "${IFACE}" != "sit0" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user