mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-08-04 02:04:39 +02:00
always write warnings and errors to log
This commit is contained in:
parent
27b2fffaaf
commit
b35c0b8a6f
10 changed files with 25 additions and 12 deletions
|
@ -10,13 +10,15 @@
|
|||
:local LatestVersion [ / system package update get latest-version ];
|
||||
|
||||
:if ($InstalledVersion = $LatestVersion) do={
|
||||
:error ("Version " . $LatestVersion . " is already installed.");
|
||||
:log info ("Version " . $LatestVersion . " is already installed.");
|
||||
:error "No updates available.";
|
||||
}
|
||||
|
||||
:foreach Package in=[ / system package find where !bundle ] do={
|
||||
:local PkgName [ / system package get $Package name ];
|
||||
if ([ $DownloadPackage $PkgName $LatestVersion ] = false) do={
|
||||
:error ("Download for package " . $PkgName . " failed.");
|
||||
:log error ("Download for package " . $PkgName . " failed.");
|
||||
:error "Error: See log for details.";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue