mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-16 10:09:37 +00:00
capsman-rolling-upgrade: early exit with :exit
This commit is contained in:
parent
d52feb86f6
commit
244027c90b
4 changed files with 10 additions and 16 deletions
|
|
@ -5,14 +5,13 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade.capsman
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.22
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
#
|
||||
# !! Do not edit this file, it is generated from template!
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -23,8 +22,7 @@
|
|||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
|
||||
:local InstalledVersion [ /system/package/update/get installed-version ];
|
||||
|
|
@ -46,5 +44,5 @@
|
|||
}
|
||||
}
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade%TEMPL%
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.22
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
# !! This is just a template to generate the real script!
|
||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -24,8 +23,7 @@
|
|||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
|
||||
:local InstalledVersion [ /system/package/update/get installed-version ];
|
||||
|
|
@ -54,5 +52,5 @@
|
|||
}
|
||||
}
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade.wifi
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.22
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
#
|
||||
# !! Do not edit this file, it is generated from template!
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -23,8 +22,7 @@
|
|||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
|
||||
:local InstalledVersion [ /system/package/update/get installed-version ];
|
||||
|
|
@ -47,5 +45,5 @@
|
|||
}
|
||||
}
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Run rolling CAP upgrades from CAPsMAN
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue