From: Florian Eckert Date: Thu, 9 Jul 2026 12:29:52 +0000 (+0200) Subject: strongswan: do not use config_foreach named section globals X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e5c5a23a8badeeb0c6d469b8e73c9f4581da04a7;p=openwrt-packages.git strongswan: do not use config_foreach named section globals In a previous commit, the anonymous 'ipsec' section was changed to a named section called 'globals'. The reason for this is that this is where the 'strongswan.conf' configuration option are saved. This should only occur once. Since only one strongswan service can be running on the system. Therefore, in this commit, the 'config_foreach' loop is removed and the section is permanently set to 'globals'. This commit does not change the function and is a preparatory commit. Assuming there is a global section named 'ipsec'. Signed-off-by: Florian Eckert --- diff --git a/net/strongswan/files/swanctl.init b/net/strongswan/files/swanctl.init index 1e8069cb3..ecdc613c8 100644 --- a/net/strongswan/files/swanctl.init +++ b/net/strongswan/files/swanctl.init @@ -652,7 +652,7 @@ config_remote() { swanctl_xappend0 "" } -config_ipsec() { +config_strongswan_generate() { local conf="$1" local debug install_routes routing_tables_ignored device_list @@ -714,7 +714,7 @@ prepare_env() { # Generate /var/ipsec/strongswan.conf swan_reset swan_xappend0 "# generated by /etc/init.d/swanctl" - config_foreach config_ipsec ipsec + config_strongswan_generate globals # Generate /var/swanctl/swanctl.conf swanctl_reset