]> git.99rst.org Git - openwrt-packages.git/commitdiff
strongswan: move uci-defaults migration into subfunction
authorFlorian Eckert <redacted>
Mon, 13 Jul 2026 08:18:48 +0000 (10:18 +0200)
committerPhilip Prindeville <redacted>
Thu, 16 Jul 2026 20:27:36 +0000 (14:27 -0600)
To make the migration script more organized, the migration for the 'ipsec'
unamed section to 'ipsec' named section 'globals' has been moved to a
subfunction.

The change prepares the new migration script to migrate other areas.

Signed-off-by: Florian Eckert <redacted>
net/strongswan/files/etc/uci-defaults/strongswan

index b11bd69da07376f19e86741b824cbff77eb43f91..e9d3121c195526c862123a36ccda8f4d6591b809 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-main() {
+migrate_ipsec() {
        # Skip migration if the 'globals' section already exists
        uci show ipsec.globals 1>/dev/null 2>/dev/null
        [ "$?" = "0" ] && return
@@ -10,6 +10,10 @@ main() {
        uci -q commit ipsec
 }
 
+main() {
+       migrate_ipsec
+}
+
 main
 
 exit 0
git clone https://git.99rst.org/PROJECT