From: Florian Eckert Date: Fri, 10 Jul 2026 11:06:41 +0000 (+0200) Subject: strongswan: move strongswan scripts generation into subfunction X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b80ff9d162aadc5314b86d38e90ee5283e3a31bc;p=openwrt-packages.git strongswan: move strongswan scripts generation into subfunction This makes the generation process clearer and more extensible. This commit does not change the function and is a preparatory commit. Signed-off-by: Florian Eckert --- diff --git a/net/strongswan/files/swanctl.init b/net/strongswan/files/swanctl.init index a42f07f0e..dd30f340f 100644 --- a/net/strongswan/files/swanctl.init +++ b/net/strongswan/files/swanctl.init @@ -652,6 +652,14 @@ config_remote() { swanctl_xappend0 "" } +config_charon_scripts() { + local conf="$1" + + swan_xappend1 "start-scripts {" + swan_xappend2 "load-all = /usr/sbin/swanctl --load-all --noprompt" + swan_xappend1 "}" +} + config_charon_interfaces_use() { local conf="$1" @@ -713,9 +721,7 @@ config_strongswan_generate() { config_charon_install_routes "$conf" config_charon_ignore_routing_tables "$conf" config_charon_interfaces_use "$conf" - swan_xappend1 "start-scripts {" - swan_xappend2 "load-all = /usr/sbin/swanctl --load-all --noprompt" - swan_xappend1 "}" + config_charon_scripts "$conf" swan_xappend1 "syslog {" swan_xappend2 "identifier = ipsec" swan_xappend2 "daemon {"