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>
#!/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
uci -q commit ipsec
}
+main() {
+ migrate_ipsec
+}
+
main
exit 0