]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Added option to disable ping check for mirrors.
authorChristian Schmidt <maniacikarus@ipfire.org>
Fri, 25 Sep 2009 15:44:08 +0000 (17:44 +0200)
committerChristian Schmidt <maniacikarus@ipfire.org>
Fri, 25 Sep 2009 15:44:08 +0000 (17:44 +0200)
html/cgi-bin/pakfire.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
src/pakfire/lib/functions.pl

index 2d6f1c8f9698ed22cbd822d2fc1b2bb80c3e3186..8f20d57767293835e1a036e177784ef73c016ed5 100755 (executable)
@@ -44,6 +44,7 @@ $pakfiresettings{'INSPAKS'} = '';
 $pakfiresettings{'DELPAKS'} = '';
 $pakfiresettings{'AUTOUPDATE'} = 'off';
 $pakfiresettings{'AUTOUPGRADE'} = 'off';
+$pakfiresettings{'HEALTHCHECK'} = 'on';
 $pakfiresettings{'UUID'} = 'on';
 
 sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
@@ -169,6 +170,9 @@ $checked{'AUTOUPDATE'}{$pakfiresettings{'AUTOUPDATE'}} = "checked='checked'";
 $checked{'AUTOUPGRADE'}{'off'} = '';
 $checked{'AUTOUPGRADE'}{'on'} = '';
 $checked{'AUTOUPGRADE'}{$pakfiresettings{'AUTOUPGRADE'}} = "checked='checked'";
+$checked{'HEALTHCHECK'}{'off'} = '';
+$checked{'HEALTHCHECK'}{'on'} = '';
+$checked{'HEALTHCHECK'}{$pakfiresettings{'HEALTHCHECK'}} = "checked='checked'";
 $checked{'UUID'}{'off'} = '';
 $checked{'UUID'}{'on'} = '';
 $checked{'UUID'}{$pakfiresettings{'UUID'}} = "checked='checked'";
@@ -292,6 +296,9 @@ print <<END;
                        <tr><td align='left' width='45%'>$Lang::tr{'pakfire core update auto'}</td><td align="left">
           on <input type='radio' name='AUTOUPGRADE' value='on' $checked{'AUTOUPGRADE'}{'on'} /> |
           <input type='radio' name='AUTOUPGRADE' value='off' $checked{'AUTOUPGRADE'}{'off'} /> off </td></tr>
+                       <tr><td align='left' width='45%'>$Lang::tr{'pakfire health check'}</td><td align="left">
+          on <input type='radio' name='HEALTHCHECK' value='on' $checked{'HEALTHCHECK'}{'on'} /> |
+          <input type='radio' name='HEALTHCHECK' value='off' $checked{'HEALTHCHECK'}{'off'} /> off </td></tr>          
                        <tr><td align='left' width='45%'>$Lang::tr{'pakfire register'}</td><td align="left">
           on <input type='radio' name='UUID' value='on' $checked{'UUID'}{'on'} /> |
           <input type='radio' name='UUID' value='off' $checked{'UUID'}{'off'} /> off </td></tr>
index ee5743967dbf33b1d13163e8fa80840c93e2cd5b..f6226ec080506ad5d9cb04f23eb026cd8b6fd639 100644 (file)
 'pakfire configuration' => 'Pakfire Konfiguration',
 'pakfire core update auto' => 'Core und Addon Updates automatisch installieren:',
 'pakfire core update level' => 'Core-Update-Level',
+'pakfire health check' => 'Mirrors auf Erreichbarkeit prüfen(ping)',
 'pakfire install description' => 'Wählen Sie ein oder mehrere Pakete zur Installation aus und drücken Sie auf das plus Symbol.',
 'pakfire install package' => 'Sie möchten folgende Pakete installieren: ',
 'pakfire installed addons' => 'Installierte Addons:',
index 1fcae040b299cc174a16ab6e45d8aa95d5bbeefb..590a68fd54a800f56bc2b1cddba1db131255fba9 100644 (file)
 'pakfire configuration' => 'Pakfire Configuration',
 'pakfire core update auto' => 'Install core and addon updates automatically:',
 'pakfire core update level' => 'Core-Update-Level',
+'pakfire health check' => 'Check if mirror is reachable(ping)',
 'pakfire install description' => 'Please choose one or more items from the list below and click the plus to install.',
 'pakfire install package' => 'You want to install the following packages: ',
 'pakfire installed addons' => 'Installed Addons:',
index 0d8e8af3762bffb5c4e6cd685e1120182974cd5e..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);
                                }