packages-update: accept lower and upper case characters

This commit is contained in:
Christian Hesse 2020-05-26 22:59:50 +02:00
parent bcf57f0adb
commit 856c879fd8

View file

@ -36,7 +36,7 @@ $ScriptLock "packages-update";
:if ([ $ScriptFromTerminal "packages-update" ] = true) do={
:if (!([ /system resource get version ] ~ ($Update->"channel"))) do={
:put "Update channel changed. Want to downgrade? [y/N]";
:if ([ :terminal inkey timeout=60 ] = 121) do={
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
$LogPrintExit info ("Rebooting for downgrade.") false;
:delay 1s;
/ system package downgrade;
@ -44,7 +44,7 @@ $ScriptLock "packages-update";
}
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
:if ([ :terminal inkey timeout=60 ] = 115) do={
:if (([ :terminal inkey timeout=60 ] % 32) = 19) do={
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
on-event=(":global RandomDelay; \$RandomDelay 3600; " . \
"/ system scheduler remove reboot-for-update; / system reboot;");