diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-26 14:47:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-26 14:47:00 +0000 |
commit | 2c42b21247e3a50c500f5dbea1549092022c30ad (patch) | |
tree | e0dfa683aaadb74fdedcd8428a95b629277addec /main/shorewall-shell/restore-default-route.patch | |
parent | b980464b680a4f7f7187d0c5107a1b1840139ba1 (diff) | |
download | aports-2c42b21247e3a50c500f5dbea1549092022c30ad.tar.bz2 aports-2c42b21247e3a50c500f5dbea1549092022c30ad.tar.xz |
main/shorewall-shell: add option to disable saving/restoring default route
When starting, shorewall will save all default routes. When stop, it
will try to restore it. But does it badly. On multiisp setups with pingu
it will break things.
We (ab)use the RESTORE_DEFAULT_ROUTE to make it possible to avoid
restoring the default route.
Diffstat (limited to 'main/shorewall-shell/restore-default-route.patch')
-rw-r--r-- | main/shorewall-shell/restore-default-route.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/shorewall-shell/restore-default-route.patch b/main/shorewall-shell/restore-default-route.patch new file mode 100644 index 0000000000..8640589420 --- /dev/null +++ b/main/shorewall-shell/restore-default-route.patch @@ -0,0 +1,13 @@ +--- ./lib.providers.orig ++++ ./lib.providers +@@ -378,7 +378,9 @@ + # + # Capture the default route(s) if we don't have it (them) already. + # +-[ -f \${VARDIR}/default_route ] || ip route list | grep -E '^\s*(default |nexthop )' > \${VARDIR}/default_route ++if [ "\$RESTORE_DEFAULT_ROUTE" != "No" ] && ! [ -f \${VARDIR}/default_route ]; then ++ ip route list | grep -E '^\s*(default |nexthop )' > \${VARDIR}/default_route ++fi + # + # Initialize the file that holds 'undo' commands + # |