From e85d32bbb3eb5c5debf106737c4a4fe8c4729325 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 19 Jan 2011 17:35:18 +0100 Subject: [PATCH 1/3] Fix index.cgi autorefresh. --- config/rootfiles/core/45/filelists/files | 3 ++- html/cgi-bin/index.cgi | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/rootfiles/core/45/filelists/files b/config/rootfiles/core/45/filelists/files index d3c27e8a1..46d399105 100644 --- a/config/rootfiles/core/45/filelists/files +++ b/config/rootfiles/core/45/filelists/files @@ -1,3 +1,4 @@ etc/system-release etc/issue -srv/web/ipfire/cgi-bin/proxy.cgi +srv/web/ipfire/cgi-bin/index.cgi +srv/web/ipfire/cgi-bin/proxy.cgi \ No newline at end of file diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 6a93b6837..45b0fd74c 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -58,7 +58,7 @@ my %mainsettings = (); my $connstate = &Header::connectionstatus(); - if ( -e "/var/ipfire/main/gpl-acceted" ) { + if ( -e "/var/ipfire/main/gpl-accepted" ) { if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'} || $cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { $refresh = ""; } elsif ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){ From 73c7eff80ece6765c5c147514a3ce2153f7bf4c8 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 19 Jan 2011 17:47:56 +0100 Subject: [PATCH 2/3] Remove some httpd errorlog entries. --- config/rootfiles/core/45/filelists/files | 5 ++++- html/cgi-bin/connections.cgi | 4 ++-- html/cgi-bin/index.cgi | 2 +- html/cgi-bin/pppsetup.cgi | 4 ++-- html/cgi-bin/proxy.cgi | 2 +- html/cgi-bin/vpnmain.cgi | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config/rootfiles/core/45/filelists/files b/config/rootfiles/core/45/filelists/files index 46d399105..afefcadb0 100644 --- a/config/rootfiles/core/45/filelists/files +++ b/config/rootfiles/core/45/filelists/files @@ -1,4 +1,7 @@ etc/system-release etc/issue +srv/web/ipfire/cgi-bin/connections.cgi srv/web/ipfire/cgi-bin/index.cgi -srv/web/ipfire/cgi-bin/proxy.cgi \ No newline at end of file +srv/web/ipfire/cgi-bin/pppsetup.cgi +srv/web/ipfire/cgi-bin/proxy.cgi +srv/web/ipfire/cgi-bin/vpnmain.cgi diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 7b53c009e..14ee20910 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -57,7 +57,7 @@ if (open(IP, "${General::swroot}/red/local-ipaddress")) { push(@colour, ${Header::colourfw} ); } -my @vpn = `/usr/local/bin/ipsecctrl I|grep erouted|cut -d"]" -f3|cut -d"=" -f4|cut -d";" -f1| sed "s|/| |g"`; +my @vpn = `/usr/local/bin/ipsecctrl I 2>/dev/null|grep erouted|cut -d"]" -f3|cut -d"=" -f4|cut -d";" -f1| sed "s|/| |g"`; foreach my $route (@vpn) { chomp($route); my @temp = split(/[\t ]+/, $route); diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 45b0fd74c..8e623c96a 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -431,7 +431,7 @@ foreach my $line (@df) { } # S.M.A.R.T. health warning -my @files = `/bin/ls /var/run/smartctl_out_hddtemp-*`; +my @files = `/bin/ls /var/run/smartctl_out_hddtemp-* 2>/dev/null`; foreach my $file (@files) { chomp ($file); my $disk=`echo $file | cut -d"-" -f2`; diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi index 0bfeabd1b..e2af0a088 100644 --- a/html/cgi-bin/pppsetup.cgi +++ b/html/cgi-bin/pppsetup.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -486,7 +486,7 @@ print </dev/null | grep 0`; chomp ($atmdev); if ($atmdev ne '') { print < # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index f336ec610..55582952b 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2010 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2011 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -2400,7 +2400,7 @@ EOF &General::readhasharray("${General::swroot}/vpn/config", \%confighash); $cgiparams{'CA_NAME'} = ''; - my @status = `/usr/local/bin/ipsecctrl I`; + my @status = `/usr/local/bin/ipsecctrl I 2>/dev/null`; # suggest a default name for this side if ($cgiparams{'VPN_IP'} eq '' && -e "${General::swroot}/red/active") { From 8dbba0e4607ad83d26849e87b09ef52a5ec3f70f Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 19 Jan 2011 18:43:16 +0100 Subject: [PATCH 3/3] Fixed Avira Update Caching and improved Gentoo Caching. --- config/rootfiles/core/45/filelists/files | 1 + config/rootfiles/core/45/update.sh | 4 ++++ config/updxlrator/updxlrator | 11 +++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/rootfiles/core/45/filelists/files b/config/rootfiles/core/45/filelists/files index afefcadb0..f6d15ca78 100644 --- a/config/rootfiles/core/45/filelists/files +++ b/config/rootfiles/core/45/filelists/files @@ -5,3 +5,4 @@ srv/web/ipfire/cgi-bin/index.cgi srv/web/ipfire/cgi-bin/pppsetup.cgi srv/web/ipfire/cgi-bin/proxy.cgi srv/web/ipfire/cgi-bin/vpnmain.cgi +usr/sbin/updxlrator diff --git a/config/rootfiles/core/45/update.sh b/config/rootfiles/core/45/update.sh index 40d08d438..1197905cd 100644 --- a/config/rootfiles/core/45/update.sh +++ b/config/rootfiles/core/45/update.sh @@ -26,6 +26,8 @@ # #Stop services +echo Stopping Proxy +/etc/init.d/squid stop 2>/dev/null # #Extract files @@ -33,6 +35,8 @@ extract_files # #Start services +echo Starting Proxy +/etc/init.d/squid start 2>/dev/null # #Update Language cache diff --git a/config/updxlrator/updxlrator b/config/updxlrator/updxlrator index 7f44ff76d..4aaa38938 100644 --- a/config/updxlrator/updxlrator +++ b/config/updxlrator/updxlrator @@ -101,7 +101,10 @@ while (<>) { # Section: Linux Downloads # ----------------------------------------------------------- - if ($source_url =~ m@^[h|f]t?tp://[^?]+\.(deb|rpm)$@i) + if ( + ($source_url =~ m@^[h|f]t?tp://[^?]+\.(deb|rpm)$@i) || + ($source_url =~ m@^[h|f]t?tp://[^?]+/distfiles/[^?]+\.(tar\.gz|tar\.bz2|tgz|zip|patch\.bz2|gz|docx|patch|pdf|exe)$@i) + ) { $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Linux",$mirror); } @@ -157,7 +160,11 @@ while (<>) { # Section: Avira Downloads # ----------------------------------------------------------- - if ($source_url =~ m@^http://dl[0-9]\.avgate\.net/.*\.(htm|html|gz)$@i) + if ( + ($source_url =~ m@^http://dl[0-9]\.avgate\.net/.*\.(htm|html|gz)$@i) || + ($source_url =~ m@^http://80.190.130.19[4-5]/update/.*\.(htm|html|gz)$@i) || + ($source_url =~ m@^http://62.146.64.14[6-7]/update/.*\.(htm|html|gz)$@i) + ) { $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Avira",$mirror); }