Added option to disable ping check for mirrors.
[people/pmueller/ipfire-2.x.git] / src / pakfire / lib / functions.pl
index 0d8e8af..d2ad7e3 100644 (file)
@@ -324,7 +324,11 @@ sub selectmirror {
                                $proto = $templine[0];
                                $host = $templine[1];
                                $path = $templine[2];
-                               if (pinghost("$host")) {
+                               if ($pakfiresettings{'HEALTHCHECK'} eq "off") {
+                                       logger("PING INFO: Healthcheck is disabled");
+                                       $found = 1;
+                                       return ($proto, $host, $path);
+                               elsif (pinghost("$host")) {
                                        $found = 1;
                                        return ($proto, $host, $path);
                                }