diff options
author | Christian Hesse <mail@eworm.de> | 2021-02-22 15:14:10 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-02-24 21:51:54 +0100 |
commit | f46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch) | |
tree | 31544a450651d0705ecdea0c3d35e650ef784d67 /capsman-download-packages | |
parent | b0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff) |
global: give script or function name in log messages
Diffstat (limited to 'capsman-download-packages')
-rw-r--r-- | capsman-download-packages | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/capsman-download-packages b/capsman-download-packages index a9ef529..37e2658 100644 --- a/capsman-download-packages +++ b/capsman-download-packages @@ -7,12 +7,13 @@ # download and cleanup packages for CAP installation from CAPsMAN # https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-download-packages.md +:local 0 "capsman-download-packages"; :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :global CleanFilePath; :global DownloadPackage; -:global LogPrintExit; +:global LogPrintExit2; :global MkDir; :global ScriptLock; :global WaitFullyConnected; @@ -25,15 +26,15 @@ $WaitFullyConnected; :local Updated false; :if ([ :len $PackagePath ] = 0) do={ - $LogPrintExit warning ("The CAPsMAN package path is not defined, can not download packages.") true; + $LogPrintExit2 warning $0 ("The CAPsMAN package path is not defined, can not download packages.") true; } :if ([ :len [ / file find where name=$PackagePath type="directory" ] ] = 0) do={ :if ([ $MkDir $PackagePath ] = false) do={ - $LogPrintExit warning ("Creating directory at CAPsMAN package path (" . \ + $LogPrintExit2 warning $0 ("Creating directory at CAPsMAN package path (" . \ $PackagePath . ") failed!") true; } - $LogPrintExit info ("Created directory at CAPsMAN package path (" . $PackagePath . \ + $LogPrintExit2 info $0 ("Created directory at CAPsMAN package path (" . $PackagePath . \ "). Please place your packages!") false; } |