Ticket #10617: 0004-Keep-ipsec-configuration-information-across-upgrades.patch

File 0004-Keep-ipsec-configuration-information-across-upgrades.patch, 1.4 KB (added by kevin@…, 4 years ago)

Keep ipsec configuration information across upgrades

  • net/openswan/Makefile

    From e88d0414d2e2ab4db7aadfddcdbc8c97cd49321e Mon Sep 17 00:00:00 2001
    From: Kevin Locke <kevin@kevinlocke.name>
    Date: Fri, 9 Dec 2011 15:18:09 -0700
    Subject: [PATCH 4/5] Keep ipsec configuration information across upgrades
    
    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>
    ---
     net/openswan/Makefile            |    2 ++
     net/openswan/files/ipsec.upgrade |    3 +++
     2 files changed, 5 insertions(+), 0 deletions(-)
     create mode 100644 net/openswan/files/ipsec.upgrade
    
    diff --git a/net/openswan/Makefile b/net/openswan/Makefile
    index ac155c6..6920a71 100644
    a b define Package/openswan/install 
    9797        rm -rf $(1)/var 
    9898        rm -rf $(1)/etc/rc.d 
    9999        find $(1) -name \*.old | xargs rm -rf 
     100        $(INSTALL_DIR) $(1)/lib/upgrade/keep.d 
     101        $(INSTALL_DATA) files/ipsec.upgrade $(1)/lib/upgrade/keep.d/ipsec 
    100102endef 
    101103 
    102104$(eval $(call BuildPackage,openswan)) 
  • new file net/openswan/files/ipsec.upgrade

    diff --git a/net/openswan/files/ipsec.upgrade b/net/openswan/files/ipsec.upgrade
    new file mode 100644
    index 0000000..36ba0c5
    - +  
     1/etc/ipsec.conf 
     2/etc/ipsec.d/ 
     3/etc/ipsec.secrets