aboutsummaryrefslogtreecommitdiff
path: root/net/shorewall-lite/files
diff options
context:
space:
mode:
authorW. van den Akker <wvdakker@wilsoft.nl>2017-11-13 08:03:15 +0100
committerW. van den Akker <wvdakker@wilsoft.nl>2017-11-13 08:03:51 +0100
commit06fcb6e091fbfe1818a661eb4b19c4f45d6061c1 (patch)
tree027e982830f1a596692db7f98d3d602681d054d4 /net/shorewall-lite/files
parent2557e39a38de8307fb00c9f4301b98714cd9a663 (diff)
Shorewall-lite: Bump to version 5.1.8.1
Several changes in Makefile. Migrate init script to procd. Signed-off-by: W. van den Akker <wvdakker@wilsoft.nl>
Diffstat (limited to 'net/shorewall-lite/files')
-rw-r--r--net/shorewall-lite/files/hostname2
-rw-r--r--net/shorewall-lite/files/hotplug_iface13
-rw-r--r--net/shorewall-lite/files/shorewall-lite.init32
3 files changed, 40 insertions, 7 deletions
diff --git a/net/shorewall-lite/files/hostname b/net/shorewall-lite/files/hostname
index 42e164371..db08bac8c 100644
--- a/net/shorewall-lite/files/hostname
+++ b/net/shorewall-lite/files/hostname
@@ -1,2 +1,2 @@
#!/bin/sh
-cat /proc/sys/kernel/hostname
+uci get system.@system[0].hostname
diff --git a/net/shorewall-lite/files/hotplug_iface b/net/shorewall-lite/files/hotplug_iface
index b8b79830a..90ed80c8c 100644
--- a/net/shorewall-lite/files/hotplug_iface
+++ b/net/shorewall-lite/files/hotplug_iface
@@ -1,12 +1,13 @@
#!/bin/sh
-# should restart shorewall-lite when an interface comes up
+# should restart shorewall when an interface comes up
-[ ifup = "$ACTION" ] && {
+case "$ACTION" in
+ ifup)
/etc/init.d/shorewall-lite restart
-}
-
-[ ifdown = "$ACTION" ] && {
+ ;;
+ ifdown)
# might need to restore some routing
/etc/init.d/shorewall-lite restart
-}
+ ;;
+esac \ No newline at end of file
diff --git a/net/shorewall-lite/files/shorewall-lite.init b/net/shorewall-lite/files/shorewall-lite.init
new file mode 100644
index 000000000..c3236e5bf
--- /dev/null
+++ b/net/shorewall-lite/files/shorewall-lite.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 -l $OPTIONS start $STARTOPTIONS
+}
+
+stop_service() {
+ load_params
+
+ ${SBINDIR}/shorewall -l $OPTIONS stop $STOPOPTIONS
+}
+
+restart_service() {
+ load_params
+
+ ${SBINDIR}/shorewall -l $OPTIONS restart $RESTARTOPTIONS
+}
+
+reload_service() {
+ load_params
+
+ ${SBINDIR}/shorewall -l $OPTIONS reload $RESTARTOPTIONS
+}