]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:45:03 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 14:45:03 +0000 (17:45 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 14:45:03 +0000 (17:45 +0300)
html/AM-GlobalFunc.rsc

index e92f73555085d6d14ef1360ffa30eac70b5d5ec9..cad8095177ab3df79f5b53e6916b50ada0357d6c 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/577/ab2aad07";
+:global CommitId "main/578/c7ab46ac";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:35:03 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 17:45:03 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;
@@ -85,8 +85,6 @@
 :global RandomDelay;
 :global GetRandomNumber;
 :global EscapeForRegEx;
-:global ExitError;
-:global ExitOnError;
 :global CharacterMultiply;
 :global CharacterReplace;
 :global CleanFilePath;
 :global GlobalConfMigration;
 :global VersionToNum;
 :global RequiredRouterOS;
-
+:global ExitError;
+:global ExitOnError;
+:global FetchLargeFiles;
+:global FetchHuge;
 :global FetchUserAgentStr;
 :global CertificateAvailable;
 :global CertificateDownload;
 :global CertificateNameByCN;
 :global CharacterMultiply;
-:global FetchLargeFiles;
+
 :global InspectVar;
 :global InspectVarRet;
 :global ParseCustom;
 
 :set IsCheckUpdates do={
   :local isInfo [:tobool $1];
-  :global LogPrint;
   :global updateChannel;
   :global PkgUpdStatus;
   :global currentUpdateChannel;
   :global ROsVerAvail;
   :global arrDeviceInfo;
-  $LogPrint debug $0 ("\$isInfo = " . $isInfo); 
+  :log info ($0 . " \$isInfo = " . $isInfo); 
   :local CurrentChannel [ /system/package/update/get channel ];
   :if ([ :len $updateChannel ] > 0 && $CurrentChannel != $updateChannel) do={
     :retry command={/system/package/update set channel=$updateChannel}  delay=300ms max=5 on-error={};
-    $LogPrint debug $0 ("Set updates channel to: $updateChannel");
+    :log info ($0 . " Set updates channel to: $updateChannel");
   }
-
   :local Update [ /system/package/update/get ];
   :local Channel [ :tostr ($Update->"channel") ];
   :set currentUpdateChannel $Channel;
-  $LogPrint debug $0 ("Update Channel: " . $Channel . ".");
-
-
+  :log info ($0 . " Update Channel: " . $Channel . ".");
   :local StatusPkg "undefined";
-  $LogPrint debug $0 ("Checking for updates...");
+  :log info ($0 . " Checking for updates...");
   :retry command={:set $StatusPkg ([/system/package/update/check-for-updates without-paging as-value]->"status")} \
    delay=300ms max=5 on-error={};
-  $LogPrint debug $0 ("\$StatusPkg = " . $StatusPkg);
+  :log info ($0 . " \$StatusPkg = " . $StatusPkg);
   :if ($StatusPkg = "New version is available") do={ :set PkgUpdStatus true; } else={ :set PkgUpdStatus false; }
   :set ROsVerAvail [ :tostr [ /system/package/update/get latest-version ] ];
-  $LogPrint debug $0 ("\$PkgUpdStatus = " . $PkgUpdStatus);
+  :log info ($0 . " \$PkgUpdStatus = " . $PkgUpdStatus);
   :if ($isInfo != false || $PkgUpdStatus = true) do={
-    $LogPrint debug $0 ("\$PkgUpdStatus = " . $PkgUpdStatus);
+    :log info ($0 . " \$PkgUpdStatus = " . $PkgUpdStatus);
     :if ([ :typeof $arrDeviceInfo ] != "array") do={
       :set arrDeviceInfo [:toarray $arrDeviceInfo];
     }
   :global currentUpdateChannel;
   :global ROsVerAvail;
   :global arrDeviceInfo;
-
   :local Status "";
   :local Update;
   :local WaitCount 0;
-
   :if ([ $IsCheckUpdates true ] = false) do={
     :return false;
   }
-
   :set Status [ :tostr [ /system/package/update/get status ] ];
   :while (($Status = "" || $Status = "finding out latest version...") && $WaitCount < 60) do={
     :delay 1s;
     :set WaitCount ($WaitCount + 1);
     :set Status [ :tostr [ /system/package/update/get status ] ];
    }
-
   :set Update [ /system/package/update/get ];
   :set currentUpdateChannel [ :tostr ($Update->"channel") ];
   :set ROsVerAvail [ :tostr ($Update->"latest-version") ];
     :set arrDeviceInfo [:toarray $arrDeviceInfo];
   }
   :set ($arrDeviceInfo->"devUpdates") $Update;
-
   :if ($Status = "" || $Status = "finding out latest version...") do={
     :return false;
   }
 :set GetArrDeviceInfo do={
    :global LogPrint;
    :global arrDeviceInfo;
-
    :global devBoardName;
    :global devModel;
    :global devRunning;