aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/shorewall6/APKBUILD46
-rw-r--r--testing/shorewall6/shorewall6.initd70
2 files changed, 116 insertions, 0 deletions
diff --git a/testing/shorewall6/APKBUILD b/testing/shorewall6/APKBUILD
new file mode 100644
index 0000000000..c36df06542
--- /dev/null
+++ b/testing/shorewall6/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=shorewall6
+pkgver=4.5.21
+pkgrel=0
+pkgdesc="Files for the IPV6 Shorewall Firewall"
+url="http://www.shorewall.net/"
+arch="noarch"
+license="GPL-2"
+depends="shorewall-core perl iptables iproute2"
+# coreutils for install -T
+makedepends="coreutils bash"
+replaces=""
+subpackages="$pkgname-doc"
+source="http://www1.shorewall.net/pub/shorewall/${pkgver%.*}/shorewall-$pkgver/$pkgname-$pkgver.tar.bz2
+ shorewall6.initd
+ "
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure MANDIR=/usr/share/man SBINDIR=/usr/sbin || return 1
+}
+
+package() {
+ cd "$_builddir"
+ DESTDIR="$pkgdir" ./install.sh || return 1
+ rm -f "$pkgdir"/etc/init.d/shorewall6 || return 1
+ install -m755 "$srcdir"/shorewall6.initd "$pkgdir"/etc/init.d/shorewall6
+}
+
+md5sums="aaa1d6e1adb00acace63993ab6be6d37 shorewall6-4.5.21.tar.bz2
+41c4981e5230a2abeeec749f7f5bf727 shorewall6.initd"
+sha256sums="2c23a00a2ac441bcaa7c7b6b188079931f98b0444bbba137a400e81bedcd28dc shorewall6-4.5.21.tar.bz2
+f4de42b7a47cd5f4e5a86af84d80579c49f5c0e817c20e2f3919ef0f4af015ea shorewall6.initd"
+sha512sums="f95dd9cbf44378af0ce9b25f95fd1fd8e277fa38955bebd94490369bb891785744e401c62c182236a047ab55f70f571f8a4617d743ba7333a71810dda91e81f4 shorewall6-4.5.21.tar.bz2
+3d4787cf5af0f32c1b033f89e3a1b390382b64fb70a492ff4dfe78499ceff8ec9c85dccf394edfb67ed512f85d954bba46bfe3e1ea762921bb0d65705f7c3695 shorewall6.initd"
diff --git a/testing/shorewall6/shorewall6.initd b/testing/shorewall6/shorewall6.initd
new file mode 100644
index 0000000000..179e4633d7
--- /dev/null
+++ b/testing/shorewall6/shorewall6.initd
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/files/shorewall.initd,v 1.4 2013/07/13 14:09:09 constanze Exp $
+
+command=/sbin/shorewall6
+extra_commands="check clear"
+extra_started_commands="refresh reset safe_restart"
+
+depend() {
+ need net
+ provide firewall
+ after ulogd
+}
+
+start() {
+ checkpath -d -m 755 /var/lock/subsys
+ ebegin "Starting shorewall"
+ $command -f start 1>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping shorewall"
+ $command stop 1>/dev/null
+ eend $?
+}
+
+safe_restart() {
+ ebegin "Safely restarting shorewall"
+ $command safe-restart 1>/dev/null
+ eend $?
+}
+
+clear() {
+ # clear will remove all the rules and bring the system to an unfirewalled
+ # state. (21 Nov 2004 eldad)
+
+ ebegin "Clearing all shorewall rules and setting policy to ACCEPT"
+ $command clear
+ eend $?
+}
+
+reset() {
+ # reset the packet and byte counters in the firewall
+
+ ebegin "Resetting the packet and byte counters in the shorewall"
+ $command reset
+ eend $?
+}
+
+refresh() {
+ # refresh the rules involving the broadcast addresses of firewall
+ # interfaces, the black list, traffic control rules and
+ # ECN control rules
+
+ ebegin "Refreshing shorewall rules"
+ $command refresh
+ eend $?
+}
+
+check() {
+ # perform cursory validation of the zones, interfaces, hosts, rules
+ # and policy files. CAUTION: does not parse and validate the generated
+ # iptables commands.
+
+ ebegin "Checking configuration files"
+ $command check
+ eend $?
+}