mirror of
https://github.com/openwrt/packages.git
synced 2026-10-14 12:06:51 +04:00
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 <fe@dev.tdt.de>
This commit is contained in:
1 parent
89530694ff
commit
46fb7ec434
1 file changed
+5
-1
@@ -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
|
||||
Reference in new issue
Block a user