aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index d18a859..5d059fe 100644
--- a/global-functions
+++ b/global-functions
@@ -22,6 +22,7 @@
:global CertificateNameByCN;
:global CharacterReplace;
:global CleanFilePath;
+:global DefaultRouteIsReachable;
:global DeviceInfo;
:global DownloadPackage;
:global GetMacVendor;
@@ -164,6 +165,14 @@
:return $Path;
}
+# default route is reachable
+:set DefaultRouteIsReachable do={
+ :if ([ / ip route print count-only where dst-address=0.0.0.0/0 !unreachable active !routing-mark ] > 0) do={
+ :return true;
+ }
+ :return false;
+}
+
# get readable device info
:set DeviceInfo do={
:global ExpectedConfigVersion;