diff --git a/net/shorewall6-lite/Makefile b/net/shorewall6-lite/Makefile index 048b53aa7..bbed3b5b8 100644 --- a/net/shorewall6-lite/Makefile +++ b/net/shorewall6-lite/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shorewall6-lite -PKG_VERSION:=5.1.4.1 +PKG_VERSION:=5.1.8.1 PKG_DIRECTORY:=5.1 -PKG_MAINVERSION:=5.1.4 -PKG_RELEASE:=2 +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:=29a2f2be295b4f995b38e663b771660ccdc6321134bcfbd0f9378f9bb1237e3c +PKG_HASH:=7f1b99465df8f6bc47e0bc40e413b9323a5a9d0b2576709fd28366f0af5b852e PKG_MAINTAINER:=Willem van den Akker PKG_LICENSE:=GPL-2.0+ @@ -47,8 +47,7 @@ define Package/shorewall6-lite/description endef define Package/shorewall6-lite/conffiles -/etc/shorewall6-lite/shorewall6-lite.conf -/etc/shorewall6-lite/vardir +/etc/shorewall6-lite/ endef CONFIGURE_ARGS += \ @@ -59,19 +58,19 @@ define Build/Compile endef define Package/shorewall6-lite/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DIR) $(1)/etc/shorewall6-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/shorewall6-lite/state/ + $(INSTALL_DIR) $(1)/usr/share/shorewall6-lite/ $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall6-lite - $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall6-lite $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall6-lite/shorecap $(1)/usr/share/shorewall6-lite - $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite - $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite $(1)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/init.d $(1)/etc - $(CP) ./files/vardir $(1)/etc/shorewall6-lite + $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite/ $(1)/usr/share/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall6-lite $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall6-lite/shorecap $(1)/usr/share/shorewall6-lite/ + $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite/ + $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite/ $(1)/etc/ + $(INSTALL_BIN) ./files/shorewall6-lite.init $(1)/etc/init.d/shorewall6-lite + $(CP) ./files/vardir $(1)/etc/shorewall6-lite/ endef $(eval $(call BuildPackage,shorewall6-lite)) diff --git a/net/shorewall6-lite/files/hostname b/net/shorewall6-lite/files/hostname index 42e164371..db08bac8c 100644 --- a/net/shorewall6-lite/files/hostname +++ b/net/shorewall6-lite/files/hostname @@ -1,2 +1,2 @@ #!/bin/sh -cat /proc/sys/kernel/hostname +uci get system.@system[0].hostname diff --git a/net/shorewall6-lite/files/hotplug_iface b/net/shorewall6-lite/files/hotplug_iface index 40b8a0d59..bb8973b7b 100644 --- a/net/shorewall6-lite/files/hotplug_iface +++ b/net/shorewall6-lite/files/hotplug_iface @@ -1,12 +1,13 @@ #!/bin/sh -# should restart shorewall6-lite when an interface comes up +# should restart shorewall when an interface comes up -[ ifup = "$ACTION" ] && { +case "$ACTION" in + ifup) /etc/init.d/shorewall6-lite restart -} - -[ ifdown = "$ACTION" ] && { + ;; + ifdown) # might need to restore some routing /etc/init.d/shorewall6-lite restart -} + ;; +esac \ No newline at end of file diff --git a/net/shorewall6-lite/files/shorewall6-lite.init b/net/shorewall6-lite/files/shorewall6-lite.init new file mode 100644 index 000000000..c2ab8cec1 --- /dev/null +++ b/net/shorewall6-lite/files/shorewall6-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 -6l $OPTIONS start $STARTOPTIONS +} + +stop_service() { + load_params + + ${SBINDIR}/shorewall -6l $OPTIONS stop $STOPOPTIONS +} + +restart_service() { + load_params + + ${SBINDIR}/shorewall -6l $OPTIONS restart $RESTARTOPTIONS +} + +reload_service() { + load_params + + ${SBINDIR}/shorewall -6l $OPTIONS reload $RESTARTOPTIONS +} diff --git a/net/shorewall6-lite/patches/010-install_cp.patch b/net/shorewall6-lite/patches/010-install_cp.patch index 44f63e305..2be37014b 100644 --- a/net/shorewall6-lite/patches/010-install_cp.patch +++ b/net/shorewall6-lite/patches/010-install_cp.patch @@ -1,10 +1,10 @@ -Index: shorewall6-lite-5.0.15.2/install.sh +Index: shorewall6-lite-5.1.7.2/install.sh =================================================================== ---- shorewall6-lite-5.0.15.2.orig/install.sh 2016-12-20 18:41:05.000000000 +0100 -+++ shorewall6-lite-5.0.15.2/install.sh 2017-01-04 12:01:31.018724737 +0100 -@@ -549,7 +549,7 @@ - chmod 755 ${DESTDIR}${SYSCONFDIR} - fi +--- shorewall6-lite-5.1.7.2.orig/install.sh 2017-10-11 15:34:43.612217209 +0200 ++++ shorewall6-lite-5.1.7.2/install.sh 2017-10-11 15:34:43.608217428 +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/shorewall6-lite/patches/120-LOGFILE.patch b/net/shorewall6-lite/patches/120-LOGFILE.patch deleted file mode 100644 index 554f7cec6..000000000 --- a/net/shorewall6-lite/patches/120-LOGFILE.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/shorewall6-lite.conf 2012-08-08 16:29:23.000000000 +0200 -+++ b/shorewall6-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/shorewall6-lite/patches/120-logfile.patch b/net/shorewall6-lite/patches/120-logfile.patch new file mode 100644 index 000000000..143d58397 --- /dev/null +++ b/net/shorewall6-lite/patches/120-logfile.patch @@ -0,0 +1,13 @@ +Index: shorewall6-lite-5.1.7.2/shorewall6-lite.conf +=================================================================== +--- shorewall6-lite-5.1.7.2.orig/shorewall6-lite.conf 2017-10-11 15:36:41.037818015 +0200 ++++ shorewall6-lite-5.1.7.2/shorewall6-lite.conf 2017-10-11 15:36:41.033818232 +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