strongswan: add empty config
authorGlen Huang <me@glenhuang.com>
Tue, 21 Nov 2023 03:07:07 +0000 (11:07 +0800)
committerTianling Shen <cnsztl@gmail.com>
Tue, 20 Feb 2024 05:52:28 +0000 (13:52 +0800)
Without it, using uci to manipulate ipsec config can result in errors,
making it much difficult to use in uci-defaults for example.

Signed-off-by: Glen Huang <me@glenhuang.com>
net/strongswan/Makefile
net/strongswan/files/ipsec.config [new file with mode: 0644]

index 20790d8ea75ce278e1bd9c07468466093401d8d3..7b67939399b126804334ea645fd8b43339bca5a2 100644 (file)
@@ -325,7 +325,7 @@ endef
 define Package/strongswan-isakmp/description
 $(call Package/strongswan/description/Default)
  This meta-package contains only dependencies to establish  ISAKMP /
- IKE PSK connections, dropping other capabilities in favor of small size 
+ IKE PSK connections, dropping other capabilities in favor of small size
  Can fit most routers even with 4Mb flash (after removing IPv6 support).
 endef
 
@@ -585,6 +585,8 @@ define Package/strongswan-swanctl/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swanctl $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/swanctl.init $(1)/etc/init.d/swanctl
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/ipsec.config $(1)/etc/config/ipsec
 endef
 
 define Package/strongswan-gencerts/install
diff --git a/net/strongswan/files/ipsec.config b/net/strongswan/files/ipsec.config
new file mode 100644 (file)
index 0000000..4e97606
--- /dev/null
@@ -0,0 +1,2 @@
+# For strongSwan ipsec config documentation see
+# https://openwrt.org/docs/guide-user/services/vpn/strongswan/start