strongswan: preserve changed configuration files
authorJoel Low <[email protected]>
Sat, 8 Feb 2025 08:23:01 +0000 (16:23 +0800)
committerHannu Nyman <[email protected]>
Sun, 11 May 2025 18:18:37 +0000 (21:18 +0300)
After reinstalling the packages with the preserved configuration files
after a sysupgrade, the reinstalled package config files overwrite what
is on disk rather than being placed as conf-opkg. Defining these config
files will preserve them appropriately.

Signed-off-by: Joel Low <[email protected]>
net/strongswan/Makefile

index e25c4c83953037136d60e35871f10ab56ebb9d8a..70b8db44245f3fdd2fbf76be2f59bfc85fa769a3 100644 (file)
@@ -462,6 +462,10 @@ define BuildPlugin
        $(call Plugin/$(1)/install,$$(1))
   endef
 
+  define Package/strongswan-mod-$(1)/conffiles
+/etc/strongswan.d/charon/$(1).conf
+endef
+
   $$(eval $$(call BuildPackage,strongswan-mod-$(1)))
 endef
 
@@ -525,6 +529,11 @@ define Package/strongswan-charon/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libcharon.so.* $(1)/usr/lib/ipsec/
 endef
 
+define Package/strongswan-charon/conffiles
+/etc/strongswan.d/charon.conf
+/etc/strongswan.d/charon-logging.conf
+endef
+
 define Package/strongswan-charon-cmd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/charon-cmd $(1)/usr/sbin/