aboutsummaryrefslogtreecommitdiffstats
path: root/packages-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-02-22 20:01:43 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-02-24 21:51:56 +0100
commit766a92a74b728653ae73df7566f1ed34981c1063 (patch)
treedef89a4a64e699f66d8efd5593981c9c9599631a /packages-update
parent041ca062b1d07843e7ef9ae8e99a753e344189e5 (diff)
global: use $0 for $ScriptFromTerminal
Diffstat (limited to 'packages-update')
-rw-r--r--packages-update6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages-update b/packages-update
index fb5c7fa..99f1f30 100644
--- a/packages-update
+++ b/packages-update
@@ -33,7 +33,7 @@ $ScriptLock $0;
:local DoDowngrade false;
:if ($NumInstalled > $NumLatest) do={
- :if ([ $ScriptFromTerminal "packages-update" ] = true) do={
+ :if ([ $ScriptFromTerminal $0 ] = true) do={
:put "Latest version is older than installed one. Want to downgrade? [y/N]";
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
:set DoDowngrade true;
@@ -59,7 +59,7 @@ $ScriptLock $0;
/ system script run $Script;
} on-error={
$LogPrintExit2 warning $0 ("Running backup script " . $ScriptName . " before update failed!") false;
- :if ([ $ScriptFromTerminal "packages-update" ] = true) do={
+ :if ([ $ScriptFromTerminal $0 ] = true) do={
:put "Do you want to continue anyway? [y/N]";
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
$LogPrintExit2 info $0 ("User requested to continue anyway.") false;
@@ -78,7 +78,7 @@ $ScriptLock $0;
/ system package downgrade;
}
-:if ([ $ScriptFromTerminal "packages-update" ] = true) do={
+:if ([ $ScriptFromTerminal $0 ] = true) do={
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
:if (([ :terminal inkey timeout=60 ] % 32) = 19) do={
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \