Keep ipsec configuration information across upgrades
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 20 Dec 2011 04:36:40 +0000 (04:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 20 Dec 2011 04:36:40 +0000 (04:36 +0000)
The /etc/ipsec.d directory holds the certificates and CRLs used for
IPsec, many of which may have been uploaded by users.  /etc/ipsec.conf
and /etc/ipsec.secrets hold user configuration for the IPsec daemons.
Add a keep.d file to preserve these files/directories across upgrades.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
SVN-Revision: 29584

net/openswan/Makefile
net/openswan/files/ipsec.upgrade [new file with mode: 0644]

index ac155c64c70c405d3c62a845dfe5af65ac006044..6920a714adb66210863d11733cec0eaac8157eb5 100644 (file)
@@ -97,6 +97,8 @@ define Package/openswan/install
        rm -rf $(1)/var
        rm -rf $(1)/etc/rc.d
        find $(1) -name \*.old | xargs rm -rf
+       $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
+       $(INSTALL_DATA) files/ipsec.upgrade $(1)/lib/upgrade/keep.d/ipsec
 endef
 
 $(eval $(call BuildPackage,openswan))
diff --git a/net/openswan/files/ipsec.upgrade b/net/openswan/files/ipsec.upgrade
new file mode 100644 (file)
index 0000000..36ba0c5
--- /dev/null
@@ -0,0 +1,3 @@
+/etc/ipsec.conf
+/etc/ipsec.d/
+/etc/ipsec.secrets