global-functions: rename internal function: $DNSIsResolving -> $IsDNSResolving

This commit is contained in:
Christian Hesse 2022-06-17 00:18:59 +02:00
parent 0ee38a4303
commit 9aa82316c8
2 changed files with 17 additions and 17 deletions

View file

@ -23,7 +23,6 @@
:global CharacterReplace;
:global CleanFilePath;
:global DeviceInfo;
:global DNSIsResolving;
:global DownloadPackage;
:global EitherOr;
:global EscapeForRegEx;
@ -34,6 +33,7 @@
:global HexToNum;
:global IfThenElse;
:global IsDefaultRouteReachable;
:global IsDNSResolving;
:global LogPrintExit2;
:global MkDir;
:global NotificationFunctions;
@ -225,18 +225,6 @@
("\n Expected: " . $ExpectedConfigVersion) ]);
}
# check if DNS is resolving
:set DNSIsResolving do={
:global CharacterReplace;
:do {
:resolve "low-ttl.eworm.de";
} on-error={
:return false;
}
:return true;
}
# download package from upgrade server
:set DownloadPackage do={
:local PkgName [ :tostr $1 ];
@ -462,6 +450,18 @@
:return false;
}
# check if DNS is resolving
:set IsDNSResolving do={
:global CharacterReplace;
:do {
:resolve "low-ttl.eworm.de";
} on-error={
:return false;
}
:return true;
}
# log and print with same text, optionally exit
:set LogPrintExit2 do={
:local Severity [ :tostr $1 ];
@ -1217,9 +1217,9 @@
# wait for DNS to resolve
:set WaitDNSResolving do={
:global DNSIsResolving;
:global IsDNSResolving;
:while ([ $DNSIsResolving ] = false) do={
:while ([ $IsDNSResolving ] = false) do={
:delay 1s;
}
}