aboutsummaryrefslogtreecommitdiffstats
path: root/main/awall
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-08-13 17:34:35 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-08-13 17:35:00 +0300
commit919cacad3be410e68d409ec9b89825a09b233170 (patch)
tree23e048b4c5ea7f2ce632278fe2869fcf79facb67 /main/awall
parent49dc71f68e91de4dd1ca94ec71a4b9d39289a6ec (diff)
downloadaports-919cacad3be410e68d409ec9b89825a09b233170.tar.bz2
aports-919cacad3be410e68d409ec9b89825a09b233170.tar.xz
main/awall: upgrade to 1.6.2
Diffstat (limited to 'main/awall')
-rw-r--r--main/awall/APKBUILD6
-rwxr-xr-xmain/awall/setup-firewall15
2 files changed, 10 insertions, 11 deletions
diff --git a/main/awall/APKBUILD b/main/awall/APKBUILD
index 89caee0f64..c8ee4d3289 100644
--- a/main/awall/APKBUILD
+++ b/main/awall/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=awall
-pkgver=1.6.1
+pkgver=1.6.2
pkgrel=0
pkgdesc="Alpine Wall"
url="https://git.alpinelinux.org/cgit/awall/"
@@ -51,5 +51,5 @@ policies() {
install -D "$srcdir"/setup-firewall "$subpkgdir"/usr/sbin/setup-firewall
}
-sha512sums="2fb50ed96bab5445b628aead130512675ae1d36d28b4f36d17b48f5721aa335e353cd547eb9c775e23fbf69aec4509b8dc47f9e520a254507201ea69bf386c8f awall-1.6.1.tar.xz
-0ec166d5e57f1f3eb9be40074f794c6f603b29888fd39d6e56256d3ba853745c768e37a516c8bc6c9a062eeb7652b4de1d7ef7ef63f75cf24d725459c76395de setup-firewall"
+sha512sums="85a64af6ce7db84e4926d62ea1586574839306aa3cfd52ced24fd98ad4cdf0241349f4bc1f647596b6f55d29bf0c78c7c793b8b858f0ea1fe9265f7f93fc9e48 awall-1.6.2.tar.xz
+37380061c5e3499ba496ce427b8d0783029ef666ad726c392ae5c90f8e093c9ec462764b262406948b05dbc900e375e378a93268f0ebba502b0b419f6d2a885e setup-firewall"
diff --git a/main/awall/setup-firewall b/main/awall/setup-firewall
index 796413cff8..b4e776cbc3 100755
--- a/main/awall/setup-firewall
+++ b/main/awall/setup-firewall
@@ -18,8 +18,9 @@ is_running() {
}
enable_policy() {
- echo "Enabling policy $1"
- awall enable $1
+ local pol=adp-$1
+ echo "Enabling policy $pol"
+ awall enable $pol
}
enable_if_running() {
@@ -39,7 +40,7 @@ list_to_json() {
local var=$1
eval set -- \$$var
- echo -n "\"$var\": ["
+ echo -n "\"adp_$(echo $var | tr A-Z a-z)\": ["
local sep=" "
while [ "$1" ]; do
echo -n "$sep\"$1\""
@@ -97,16 +98,14 @@ if [ "$DHCP_ZONES" ]; then
enable_policy dhcp
fi
-HTTP_REPOS=$(grep ^http:// /etc/apk/repositories) && enable_policy http-client
-[ $(echo "$HTTP_REPOS" | egrep -v '^http://([.0-9]+|\[.+\])(:|/)' | wc -l) -eq 0 ] || \
- enable_policy dns-client
+egrep "^https?://" /etc/apk/repositories && enable_policy web-client
enable_if_running ntp-client chronyd ntpd openntpd
enable_if_running ssh-server dropbear sshd
enable_policy ping
-cat > /etc/awall/awall-policies.json <<EOF
+cat > /etc/awall/adp-config.json <<EOF
{
"variable": {
$(list_to_json DHCP_ZONES),
@@ -114,7 +113,7 @@ cat > /etc/awall/awall-policies.json <<EOF
$(list_to_json LAN_IFACES),
$(list_to_json LAN_PRIVATE_ADDRS)
},
- "zone": { "wan": { "iface": "$WAN_IFACE" } }
+ "zone": { "adp-wan": { "iface": "$WAN_IFACE" } }
}
EOF