diff options
Diffstat (limited to 'main/shorewall-shell')
-rw-r--r-- | main/shorewall-shell/APKBUILD | 6 | ||||
-rw-r--r-- | main/shorewall-shell/restore-default-route.patch | 13 | ||||
-rw-r--r-- | main/shorewall-shell/shorewall-shell.post-install | 6 |
3 files changed, 23 insertions, 2 deletions
diff --git a/main/shorewall-shell/APKBUILD b/main/shorewall-shell/APKBUILD index c23e11d146..53849231de 100644 --- a/main/shorewall-shell/APKBUILD +++ b/main/shorewall-shell/APKBUILD @@ -2,7 +2,7 @@ pkgname=shorewall-shell _v=4.2.11 pkgver=4.2.11 -pkgrel=4 +pkgrel=5 pkgdesc="Shoreline Firewall shell-based compiler." url="http://www.shorewall.net/" arch="noarch" @@ -14,6 +14,7 @@ source="http://www.shorewall.net/pub/shorewall/${_v%.*}/shorewall-$_v/$pkgname-$ shorewall-shell-ipset.patch shorewall-shell-providers-gateway-none.patch shorewall-shell-rp_filter.patch + restore-default-route.patch " _builddir="$srcdir"/$pkgname-$pkgver @@ -35,4 +36,5 @@ md5sums="518a7f389a6f606c109acb7dfbe18372 shorewall-shell-4.2.11.tar.bz2 64c01bc4f57203fb877bb334994eac38 shorewall-policyrouting.patch 79745ea284a08cb167b9a356ee0bff3b shorewall-shell-ipset.patch 0c6106a8cbb95d21c0c878a6235a65ac shorewall-shell-providers-gateway-none.patch -d5eadb6be45aa41f80669452baa853a6 shorewall-shell-rp_filter.patch" +d5eadb6be45aa41f80669452baa853a6 shorewall-shell-rp_filter.patch +c971270086d5de15327f498d1be64fcb restore-default-route.patch" 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 + # diff --git a/main/shorewall-shell/shorewall-shell.post-install b/main/shorewall-shell/shorewall-shell.post-install new file mode 100644 index 0000000000..34f18779ad --- /dev/null +++ b/main/shorewall-shell/shorewall-shell.post-install @@ -0,0 +1,6 @@ +#!/bin/sh + +# loglevel needs to be lowercase +if grep -q INFO /etc/shorewall/rules; then + sed '/^[^#].*[[:space:]]\+INFO/s/\([[:space:]]\)\+INFO[[:space:]]*$/\1info/' \ + /etc/shorewall/policy |