aboutsummaryrefslogtreecommitdiffstats
path: root/packages-update.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-04 17:54:28 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commitc462c0b5983811d8a8b66e08184b38440941ff1c (patch)
treed798b765641787f0220ea1340327118e0d57b229 /packages-update.rsc
parentd46156ad92322ffda1c7769d8eb9ea2b9fab6015 (diff)
parentada91536366d72e1a30c186be9289fb455ab3149 (diff)
Merge branch 'no-error-on-exit' into nextrouteros-7.15beta4-1
Diffstat (limited to 'packages-update.rsc')
-rw-r--r--packages-update.rsc10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages-update.rsc b/packages-update.rsc
index 325009f..5b6d158 100644
--- a/packages-update.rsc
+++ b/packages-update.rsc
@@ -39,10 +39,13 @@
on-event=("/system/scheduler/remove \"_RebootForUpdate\"; " . \
":global RebootForUpdate; \$RebootForUpdate;");
$LogPrintExit2 info $ScriptName ("Scheduled reboot for update at " . $StartTime . \
- " local time (" . [ /system/clock/get time-zone-name ] . ").") true;
+ " local time (" . [ /system/clock/get time-zone-name ] . ").") false;
+ :return true;
}
- $ScriptLock $ScriptName;
+ :if ([ $ScriptLock $ScriptName ] = false) do={
+ :return false;
+ }
:local Update [ /system/package/update/get ];
@@ -51,7 +54,8 @@
}
:if ($Update->"installed-version" = $Update->"latest-version") do={
- $LogPrintExit2 info $ScriptName ("Version " . $Update->"latest-version" . " is already installed.") true;
+ $LogPrintExit2 info $ScriptName ("Version " . $Update->"latest-version" . " is already installed.") false;
+ :return true;
}
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];