From: Florian Eckert Date: Mon, 13 Jul 2026 08:18:48 +0000 (+0200) Subject: strongswan: move uci-defaults migration into subfunction X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=46fb7ec434e357708a292c5d88b6abe03eb19aed;p=openwrt-packages.git strongswan: move uci-defaults migration into subfunction 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 --- diff --git a/net/strongswan/files/etc/uci-defaults/strongswan b/net/strongswan/files/etc/uci-defaults/strongswan index b11bd69da..e9d3121c1 100644 --- a/net/strongswan/files/etc/uci-defaults/strongswan +++ b/net/strongswan/files/etc/uci-defaults/strongswan @@ -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