]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/pakfire/lib/functions.pl
Added option to disable ping check for mirrors.
[people/pmueller/ipfire-2.x.git] / src / pakfire / lib / functions.pl
index 91e7930d1118cd32cc66d981c34658a310ac0b20..d2ad7e34a479ebc53850648a78e7437a316288cf 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);
                                }
@@ -404,14 +408,14 @@ sub dblist {
                        }
                }
        
-               opendir(DIR,"$Conf::dbdir/meta");
+               opendir(DIR,"$Conf::dbdir/installed");
                my @files = readdir(DIR);
                closedir(DIR);
                foreach $file (@files) {
                        next if ( $file eq "." );
                        next if ( $file eq ".." );
                        next if ( $file =~ /^old/ );
-                       open(FILE, "<$Conf::dbdir/meta/$file");
+                       open(FILE, "<$Conf::dbdir/installed/$file");
                        @meta = <FILE>;
                        close(FILE);
                        foreach $line (@meta) {