diff options
author | Philip Prindeville <philipp@redfish-solutions.com> | 2020-05-01 11:45:25 -0600 |
---|---|---|
committer | Philip Prindeville <philipp@redfish-solutions.com> | 2020-12-05 10:37:51 -0700 |
commit | 1bb157401b823d6a18222d7f943dc98fb20d7f04 (patch) | |
tree | c9347ef7105688b0f5f987f25d7fffe240e9f2cd | |
parent | 2aee3b04c0c35eb8a2ab59a6795d70dc9a873223 (diff) |
xtables-addons: iptgeoip: preserve database across sysupgrade
Updating the system image or the package should not obliterate
the downloaded/unpacked geolocation database. If you use xt_geoip
in /etc/firewall.user you don't want the database disappearing
when sysupgrade runs and then reboots your system as you'll be
left exposed.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-rw-r--r-- | net/xtables-addons/Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile index bf1b6f98c..c5e2c3f8a 100644 --- a/net/xtables-addons/Makefile +++ b/net/xtables-addons/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=xtables-addons PKG_VERSION:=3.13 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_HASH:=893c0c4ea09759cda1ab7e68f1281d125e59270f7b59e446204ce686c6a76d65 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -139,6 +139,22 @@ define Package/iptgeoip +wget-ssl +!BUSYBOX_CONFIG_ZCAT:gzip endef +define Package/iptgeoip/config + menu "Select iptgeoip options" + config IPTGEOIP_PRESERVE + bool "Preserve across sysupgrades" + default n + help + Backup and restore during sysupgrade (requires >7MB) + endmenu +endef + +ifeq ($(CONFIG_IPTGEOIP_PRESERVE),y) +define Package/iptgeoip/conffiles +/usr/share/xt_geoip/ +endef +endif + define Package/iptgeoip/install $(INSTALL_DIR) $(1)/usr/lib/xtables-addons $(CP) \ @@ -149,6 +165,7 @@ define Package/iptgeoip/install $(PKG_INSTALL_DIR)/usr/bin/xt_geoip_fetch \ $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/share/xt_geoip + touch $(1)/usr/share/xt_geoip/.keep endef |