]> git.99rst.org Git - openwrt-packages.git/commitdiff
strongswan: move strongswan scripts generation into subfunction
authorFlorian Eckert <redacted>
Fri, 10 Jul 2026 11:06:41 +0000 (13:06 +0200)
committerPhilip Prindeville <redacted>
Thu, 16 Jul 2026 20:27:36 +0000 (14:27 -0600)
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 <redacted>
net/strongswan/files/swanctl.init

index a42f07f0e6740708c85845f537f3b48868255411..dd30f340ffd5b8cbfea44ff43f8310510658c075 100644 (file)
@@ -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 {"
git clone https://git.99rst.org/PROJECT