aboutsummaryrefslogtreecommitdiff
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
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>
-rw-r--r--net/shorewall-lite/Makefile35
-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
-rw-r--r--net/shorewall-lite/patches/010-install_cp.patch12
-rw-r--r--net/shorewall-lite/patches/120-LOGFILE.patch11
-rw-r--r--net/shorewall-lite/patches/120-logfile.patch13
7 files changed, 76 insertions, 42 deletions
diff --git a/net/shorewall-lite/Makefile b/net/shorewall-lite/Makefile
index 0a08a0890..7f1648f7e 100644
--- a/net/shorewall-lite/Makefile
+++ b/net/shorewall-lite/Makefile
@@ -9,14 +9,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall-lite
-PKG_VERSION:=5.1.4.1
+PKG_VERSION:=5.1.8.1
PKG_DIRECTORY:=5.1
-PKG_MAINVERSION:=5.1.4
+PKG_MAINVERSION:=5.1.8
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_DIRECTORY)/shorewall-$(PKG_MAINVERSION)/
+PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_DIRECTORY)/shorewall-$(PKG_MAINVERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=e90d419ed8a6da615c3a0d6fdcb9481f8e71f89c2bdcff09ab027198ca2ce293
+PKG_HASH:=2efc424c1d4f737618f91864ba8e618328605514965e497660ee0ac9020b6048
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
@@ -46,8 +46,7 @@ define Package/shorewall-lite/description
endef
define Package/shorewall-lite/conffiles
-/etc/shorewall-lite/shorewall-lite.conf
-/etc/shorewall-lite/vardir
+/etc/shorewall-lite/
endef
CONFIGURE_ARGS += \
@@ -58,19 +57,19 @@ define Build/Compile
endef
define Package/shorewall-lite/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
- $(INSTALL_DIR) $(1)/etc/shorewall-lite/state
- $(INSTALL_DIR) $(1)/usr/share
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/iface/
+ $(INSTALL_DIR) $(1)/etc/shorewall-lite/state/
+ $(INSTALL_DIR) $(1)/usr/share/shorewall-lite/
$(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall-lite
- $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-lite $(1)/usr/share
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall-lite $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall-lite/shorecap $(1)/usr/share/shorewall-lite
- $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall-lite
- $(CP) $(PKG_INSTALL_DIR)/etc/shorewall-lite $(1)/etc
- $(CP) $(PKG_INSTALL_DIR)/etc/init.d $(1)/etc
- $(CP) ./files/vardir $(1)/etc/shorewall-lite
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-lite/ $(1)/usr/share/
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall-lite $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall-lite/shorecap $(1)/usr/share/shorewall-lite/
+ $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall-lite/
+ $(CP) $(PKG_INSTALL_DIR)/etc/shorewall-lite/ $(1)/etc/
+ $(INSTALL_BIN) ./files/shorewall-lite.init $(1)/etc/init.d/shorewall-lite
+ $(CP) ./files/vardir $(1)/etc/shorewall-lite/
endef
$(eval $(call BuildPackage,shorewall-lite))
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
+}
diff --git a/net/shorewall-lite/patches/010-install_cp.patch b/net/shorewall-lite/patches/010-install_cp.patch
index 0cc8e6cf7..4e47198f4 100644
--- a/net/shorewall-lite/patches/010-install_cp.patch
+++ b/net/shorewall-lite/patches/010-install_cp.patch
@@ -1,10 +1,10 @@
-Index: shorewall-lite-5.0.15.2/install.sh
+Index: shorewall-lite-5.1.7.2/install.sh
===================================================================
---- shorewall-lite-5.0.15.2.orig/install.sh 2016-12-20 18:41:05.000000000 +0100
-+++ shorewall-lite-5.0.15.2/install.sh 2017-01-04 12:01:31.018724737 +0100
-@@ -549,7 +549,7 @@
- chmod 755 ${DESTDIR}${SYSCONFDIR}
- fi
+--- shorewall-lite-5.1.7.2.orig/install.sh 2017-10-11 08:15:57.201324746 +0200
++++ shorewall-lite-5.1.7.2/install.sh 2017-10-11 08:15:57.197324953 +0200
+@@ -492,7 +492,7 @@
+ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PRODUCT} ]; then
+ [ ${DESTDIR} ] && make_parent_directory ${DESTDIR}${SYSCONFDIR} 0755
- install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT} 0640
+ install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT}/${SYSCONFFILE} 0640
diff --git a/net/shorewall-lite/patches/120-LOGFILE.patch b/net/shorewall-lite/patches/120-LOGFILE.patch
deleted file mode 100644
index 90f094771..000000000
--- a/net/shorewall-lite/patches/120-LOGFILE.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/shorewall-lite.conf 2012-08-08 16:29:23.000000000 +0200
-+++ b/shorewall-lite.conf 2012-08-13 11:11:11.687938395 +0200
-@@ -28,7 +28,7 @@
- # L O G G I N G
- ###############################################################################
-
--LOGFILE=
-+LOGFILE=/dev/null
-
- ###############################################################################
- # L O C A T I O N O F F I L E S A N D D I R E C T O R I E S \ No newline at end of file
diff --git a/net/shorewall-lite/patches/120-logfile.patch b/net/shorewall-lite/patches/120-logfile.patch
new file mode 100644
index 000000000..ff1c02e93
--- /dev/null
+++ b/net/shorewall-lite/patches/120-logfile.patch
@@ -0,0 +1,13 @@
+Index: shorewall-lite-5.1.7.2/shorewall-lite.conf
+===================================================================
+--- shorewall-lite-5.1.7.2.orig/shorewall-lite.conf 2017-10-11 08:19:35.565847520 +0200
++++ shorewall-lite-5.1.7.2/shorewall-lite.conf 2017-10-11 08:19:35.561847733 +0200
+@@ -28,7 +28,7 @@
+ # L O G G I N G
+ ###############################################################################
+
+-LOGFILE=
++LOGFILE=/dev/null
+
+ ###############################################################################
+ # L O C A T I O N O F F I L E S A N D D I R E C T O R I E S