X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fupdatexlrator.cgi;h=7227de49041e46169ce22fdf81029a485f581e71;hp=529061bf6a732ae1d18adb081f5652529ae9151e;hb=9fb25b1c17181bf7d73ac5daa9585d8fd8974604;hpb=46c01c0912ff4e3c16c90b569991e6989e27436f diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index 529061bf6a..7227de4904 100644 --- a/html/cgi-bin/updatexlrator.cgi +++ b/html/cgi-bin/updatexlrator.cgi @@ -12,8 +12,8 @@ use strict; # enable only the following on debugging purpose -#use warnings; -#use CGI::Carp 'fatalsToBrowser'; +use warnings; +use CGI::Carp 'fatalsToBrowser'; use IO::Socket; @@ -21,9 +21,6 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; -my $updxlratorversion = `cat ${General::swroot}/updatexlrator/version`; -my $sysupdflagfile = "${General::swroot}/updatexlrator/.up2date"; - my %checked=(); my %selected=(); my %netsettings=(); @@ -60,8 +57,6 @@ my $chk_cron_dly = "${General::swroot}/updatexlrator/autocheck/cron.daily"; my $chk_cron_wly = "${General::swroot}/updatexlrator/autocheck/cron.weekly"; my $chk_cron_mly = "${General::swroot}/updatexlrator/autocheck/cron.monthly"; -my $latest=substr(&check4updates,0,length($updxlratorversion)); - &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("${General::swroot}/proxy/settings", \%proxysettings); @@ -236,18 +231,6 @@ if ($errormessage) { &Header::closebox(); } -if (($updxlratorversion lt $latest) && (-e $sysupdflagfile)) { unlink($sysupdflagfile); } - -if (!-e $sysupdflagfile) { - &Header::openbox('100%', 'left', $Lang::tr{'updxlrtr update notification'}); - print "\n"; - print "\n"; - print ""; - print "\n"; - print "
$Lang::tr{'updxlrtr update information'}
\n"; - &Header::closebox(); -} - print "
\n"; &Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr update accelerator'}"); @@ -340,7 +323,7 @@ print < - Update Accelerator $updxlratorversion +   @@ -621,35 +604,6 @@ print "\n"; # ------------------------------------------------------------------- -sub check4updates -{ - if ((-e "${General::swroot}/red/active") && (-e $sysupdflagfile) && (int(-M $sysupdflagfile) > 7)) - { - my @response=();; - - my $remote = IO::Socket::INET->new( - PeerHost => 'www.advproxy.net', - PeerPort => 'http(80)', - Timeout => 1 - ); - - if ($remote) - { - print $remote "GET http://www.advproxy.net/update-accelerator/version/ipcop/latest HTTP/1.0\n"; - print $remote "User-Agent: Mozilla/4.0 (compatible; IPCop $General::version; $Lang::language; updatexlrator)\n\n"; - while (<$remote>) { push(@response,$_); } - close $remote; - if ($response[0] =~ /^HTTP\/\d+\.\d+\s200\sOK\s*$/) - { - system("touch $sysupdflagfile"); - return "$response[$#response]"; - } - } - } -} - -# ------------------------------------------------------------------- - sub savesettings { if (-e $chk_cron_dly) { unlink($chk_cron_dly); }