diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-08 17:32:12 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 20:37:57 +0100 |
commit | ba2df80f073caf6b426def177b217d1b37954d7f (patch) | |
tree | 5dadd74e56ded840e62e82127a9315c8769bfd83 /firmware-upgrade-reboot.rsc | |
parent | 19802c0b6977f9467fada4ace3cab017dd98964b (diff) | |
parent | 242ecef012f5208b6fa088a1222d0d5477e5b2ed (diff) |
Merge branch 'LogPrint' into next
Diffstat (limited to 'firmware-upgrade-reboot.rsc')
-rw-r--r-- | firmware-upgrade-reboot.rsc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware-upgrade-reboot.rsc b/firmware-upgrade-reboot.rsc index 6499d27..038f74e 100644 --- a/firmware-upgrade-reboot.rsc +++ b/firmware-upgrade-reboot.rsc @@ -14,7 +14,7 @@ :do { :local ScriptName [ :jobname ]; - :global LogPrintExit2; + :global LogPrint; :global ScriptLock; :global VersionToNum; @@ -24,18 +24,18 @@ :local RouterBoard [ /system/routerboard/get ]; :if ($RouterBoard->"current-firmware" = $RouterBoard->"upgrade-firmware") do={ - $LogPrintExit2 info $ScriptName ("Current and upgrade firmware match with version " . \ - $RouterBoard->"current-firmware" . ".") false; + $LogPrint info $ScriptName ("Current and upgrade firmware match with version " . \ + $RouterBoard->"current-firmware" . "."); :error true; } :if ([ $VersionToNum ($RouterBoard->"current-firmware") ] > [ $VersionToNum ($RouterBoard->"upgrade-firmware") ]) do={ - $LogPrintExit2 info $ScriptName ("Different firmware version is available, but it is a downgrade. Ignoring.") false; + $LogPrint info $ScriptName ("Different firmware version is available, but it is a downgrade. Ignoring."); :error true; } :if ([ /system/routerboard/settings/get auto-upgrade ] = false) do={ - $LogPrintExit2 info $ScriptName ("Firmware version " . $RouterBoard->"upgrade-firmware" . \ - " is available, upgrading.") false; + $LogPrint info $ScriptName ("Firmware version " . $RouterBoard->"upgrade-firmware" . \ + " is available, upgrading."); /system/routerboard/upgrade; } @@ -49,6 +49,6 @@ :delay $Uptime; } - $LogPrintExit2 info $ScriptName ("Firmware upgrade successful, rebooting.") false; + $LogPrint info $ScriptName ("Firmware upgrade successful, rebooting."); /system/reboot; } on-error={ } |