From 82c7fab9a616a77c9a9737606aafe8f010a0db5a Mon Sep 17 00:00:00 2001 From: "W. van den Akker" Date: Mon, 13 Nov 2017 08:06:50 +0100 Subject: Shorewall6: Add full package. Signed-off-by: W. van den Akker --- net/shorewall6/files/hostname | 3 +++ net/shorewall6/files/hotplug_iface | 13 +++++++++++++ net/shorewall6/files/shorewall6.init | 32 ++++++++++++++++++++++++++++++++ net/shorewall6/files/vardir | 2 ++ 4 files changed, 50 insertions(+) create mode 100644 net/shorewall6/files/hostname create mode 100644 net/shorewall6/files/hotplug_iface create mode 100644 net/shorewall6/files/shorewall6.init create mode 100644 net/shorewall6/files/vardir (limited to 'net/shorewall6/files') diff --git a/net/shorewall6/files/hostname b/net/shorewall6/files/hostname new file mode 100644 index 000000000..29c736ec6 --- /dev/null +++ b/net/shorewall6/files/hostname @@ -0,0 +1,3 @@ +#!/bin/sh +uci get system.@system[0].hostname + diff --git a/net/shorewall6/files/hotplug_iface b/net/shorewall6/files/hotplug_iface new file mode 100644 index 000000000..aaa03e8a9 --- /dev/null +++ b/net/shorewall6/files/hotplug_iface @@ -0,0 +1,13 @@ +#!/bin/sh + +# should restart shorewall when an interface comes up + +case "$ACTION" in + ifup) + /etc/init.d/shorewall6 restart + ;; + ifdown) + # might need to restore some routing + /etc/init.d/shorewall6 restart + ;; +esac diff --git a/net/shorewall6/files/shorewall6.init b/net/shorewall6/files/shorewall6.init new file mode 100644 index 000000000..5f74de386 --- /dev/null +++ b/net/shorewall6/files/shorewall6.init @@ -0,0 +1,32 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=50 + +load_params () { + . /usr/share/shorewall/shorewallrc +} + +start_service() { + load_params + + ${SBINDIR}/shorewall -6 $OPTIONS start $STARTOPTIONS +} + +stop_service() { + load_params + + ${SBINDIR}/shorewall -6 $OPTIONS stop $STOPOPTIONS +} + +restart_service() { + load_params + + ${SBINDIR}/shorewall -6 $OPTIONS restart $RESTARTOPTIONS +} + +reload_service() { + load_params + + ${SBINDIR}/shorewall -6 $OPTIONS reload $RESTARTOPTIONS +} diff --git a/net/shorewall6/files/vardir b/net/shorewall6/files/vardir new file mode 100644 index 000000000..f9a55a81e --- /dev/null +++ b/net/shorewall6/files/vardir @@ -0,0 +1,2 @@ +VARDIR=/tmp/state + -- cgit v1.2.3