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 <redacted>
swanctl_xappend0 ""
}
-config_ipsec() {
+config_strongswan_generate() {
local conf="$1"
local debug install_routes routing_tables_ignored device_list
# 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