diff options
author | W. van den Akker <wvdakker@wilsoft.nl> | 2017-11-13 08:06:50 +0100 |
---|---|---|
committer | W. van den Akker <wvdakker@wilsoft.nl> | 2017-11-13 08:07:06 +0100 |
commit | 82c7fab9a616a77c9a9737606aafe8f010a0db5a (patch) | |
tree | d6302b541d9a6495e3e0e93e3dc7857a670019fe /net/shorewall6/files | |
parent | 47889003d939329fac8424bfdaf046f9aaa4d621 (diff) |
Shorewall6: Add full package.
Signed-off-by: W. van den Akker <wvdakker@wilsoft.nl>
Diffstat (limited to 'net/shorewall6/files')
-rw-r--r-- | net/shorewall6/files/hostname | 3 | ||||
-rw-r--r-- | net/shorewall6/files/hotplug_iface | 13 | ||||
-rw-r--r-- | net/shorewall6/files/shorewall6.init | 32 | ||||
-rw-r--r-- | net/shorewall6/files/vardir | 2 |
4 files changed, 50 insertions, 0 deletions
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 + |