aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc11
1 files changed, 6 insertions, 5 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 9c009ae..f890376 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -12,7 +12,7 @@
:local ScriptName [ :jobname ];
# expected configuration version
-:global ExpectedConfigVersion 127;
+:global ExpectedConfigVersion 128;
# global variables not to be changed by user
:global GlobalFunctionsReady false;
@@ -673,7 +673,7 @@
:global IsTimeSyncCached;
:global IsTimeSyncResetNtp;
- :global LogPrint;
+ :global LogPrintOnce;
:if ($IsTimeSyncCached = true) do={
:return true;
@@ -693,6 +693,7 @@
:return false;
}
+ $LogPrintOnce warning $0 ("The ntp client is configured, but did not sync.");
:set IsTimeSyncResetNtp $Uptime;
/system/ntp/client/set enabled=no;
:delay 20ms;
@@ -702,7 +703,7 @@
:if ([ /system/license/get ]->"level" = "free" || \
[ /system/resource/get ]->"board-name" = "x86") do={
- $LogPrint debug $0 ("No ntp client configured, relying on RTC for CHR free license and x86.");
+ $LogPrintOnce debug $0 ("No ntp client configured, relying on RTC for CHR free license and x86.");
:return true;
}
@@ -714,7 +715,7 @@
:return false;
}
- $LogPrint debug $0 ("No time source configured! Returning gracefully...");
+ $LogPrintOnce debug $0 ("No time source configured! Returning gracefully...");
:return true;
}
@@ -1521,7 +1522,7 @@
:set FileName [ $CleanFilePath $FileName ];
:local I 1;
- :local Delay ([ :totime [ $MAX [ $EitherOr $WaitTime 2s ] 100ms ] ] / 10);
+ :local Delay ([ $MAX [ $EitherOr $WaitTime 2s ] 100ms ] / 10);
:while ([ :len [ /file/find where name=$FileName ] ] = 0) do={
:if ($I >= 10) do={