Merge branch 'core68' into next

Conflicts:
	make.sh
This commit is contained in:
Michael Tremer
2013-03-09 14:10:36 +01:00
16 changed files with 272 additions and 137 deletions

View File

@@ -144,6 +144,10 @@ sub age
my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
$atime, $mtime, $ctime, $blksize, $blocks) = stat $_[0];
my $now = time;
my $timestring = '';
my $dset = 0; # Day is set, when > 0
my $hset = 0; # Hour is set, when > 0
my $mset = 0; # Minute is set, when > 0
my $totalsecs = $now - $mtime;
my $days = int($totalsecs / 86400);
@@ -153,7 +157,50 @@ sub age
my $mins = $totalmins % 60;
my $secs = $totalsecs % 60;
return "${days}d ${hours}h ${mins}m ${secs}s";
if ($days > 1) {
${timestring} .= ${days}.' '.$Lang::tr{'days'}.', ';
$dset = 1;
}
elsif ($days == 1) {
${timestring} .= ${days}.' '.$Lang::tr{'day'}.', ';
$dset = 1;
}
if (($hours > 1) && !($dset)) {
${timestring} .= ${hours}.' '.$Lang::tr{'hours'}.', ';
$hset = 1;
}
elsif (($hours == 1) && !($dset)) {
${timestring} .= ${hours}.' '.$Lang::tr{'hour'}.', ';
$hset = 1;
}
elsif ($dset) {
${timestring} .= ${hours}.' '.$Lang::tr{'age shour'}.', ';
$hset = 1;
}
if ((($mins > 1) || ($mins == 0)) && !($dset || $hset)) {
${timestring} .= ${mins}.' '.$Lang::tr{'minutes'}.', ';
$mset = 1;
}
elsif (($mins == 1) && !($dset || $hset)) {
${timestring} .= ${mins}.' '.$Lang::tr{'minute'}.', ';
$mset = 1;
}
else {
${timestring} .= ${mins}.' '.$Lang::tr{'age sminute'}.', ';
$mset = 1;
}
if ((($secs > 1) || ($secs == 0)) && !($dset || $hset || $mset)) {
${timestring} .= ${secs}.' '.$Lang::tr{'age seconds'};
}
elsif (($secs == 1) && !($dset || $hset || $mset)) {
${timestring} .= $secs.' '.$Lang::tr{'age second'};
}
else { ${timestring} .= $secs.' '.$Lang::tr{'age ssecond'}; }
return ${timestring};
}
sub validip

View File

@@ -161,10 +161,9 @@ sub genmenu {
sub showhttpheaders
{
print "Pragma: no-cache\n";
print "Cache-control: no-cache\n";
print "Cache-control: private\n";
print "Connection: close\n";
print "Content-type: text/html\n\n";
print "Content-type: text/html; charset=UTF-8\n\n";
}
sub is_menu_visible($) {

View File

@@ -0,0 +1,17 @@
srv/web/ipfire/html/proxy.pac
boot/config.txt
etc/udev/rules.d/30-persistent-network.rules
etc/collectd.custom
etc/shadow
etc/ipsec.conf
etc/ipsec.secrets
etc/ipsec.user.conf
etc/ipsec.user.secrets
var/log/cache
var/updatecache
etc/localtime
var/ipfire/ovpn
etc/ssh/ssh_config
etc/ssh/sshd_config
etc/ssl/openssl.cnf
var/state/dhcp/dhcpd.leases

View File

@@ -0,0 +1,9 @@
etc/system-release
etc/issue
srv/web/ipfire/html/themes/ipfire/include/style.css
srv/web/ipfire/html/themes/ipfire/include/functions.pl
srv/web/ipfire/html/themes/maniac/include/style.css
srv/web/ipfire/html/include/jquery-1.9.1.min.js
var/ipfire/header.pl
var/ipfire/general-functions.pl
var/ipfire/langs

View File

@@ -0,0 +1 @@
DEPS=""

View File

@@ -0,0 +1,59 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2013 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
#
# Remove old core updates from pakfire cache to save space...
core=68
for (( i=1; i<=$core; i++ ))
do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
#
#Stop services
#
#Extract files
extract_files
#
#Start services
#
#Update Language cache
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
sync
# This update need a reboot...
#touch /var/run/need_reboot
#
#Finish
/etc/init.d/fireinfo start
sendprofile
#Don't report the exitcode last command
exit 0

View File

@@ -155,12 +155,28 @@ while (<>) {
# Section: Avast Downloads
# -----------------------------------------------------------
if ($source_url =~ m@^http://download[\d]+\.avast\.com/.*\.(exe|vpu)$@i)
if ($source_url =~ m@^http://(ion|download)[\d]+\.avast\.com/.*\.(exe|vpu|vpx)$@i)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Avast",$mirror);
}
# -----------------------------------------------------------
# Section: Mozilla Downloads
# -----------------------------------------------------------
if ($source_url=~ m@^http://.*\.mozilla\.net/.*\.((complete|partial)\.mar|exe)$@i)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Mozilla",$unique);
}
# -----------------------------------------------------------
# Section: Mcafee
# -----------------------------------------------------------
if ($source_url =~ m@^http://update\.nai\.com/.*\.(mcs|z|gem|dat|zip)$@i)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"mcafee",$mirror);
}
# -----------------------------------------------------------
# Section: Avira Downloads

File diff suppressed because one or more lines are too long

5
html/html/include/jquery-1.9.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -143,14 +143,12 @@ sub openpage {
}
print <<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>$title</title>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>$title</title>
$extrahead
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
END
;
if ($settings{'FX'} ne 'off') {
@@ -179,7 +177,7 @@ END
;
if ($settings{'SPEED'} ne 'off') {
print <<END
<script type="text/javascript" src="/include/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="/include/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
var t_current;
var t_last;
@@ -278,14 +276,12 @@ sub openpagewithoutmenu {
}
print <<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>$title</title>
$extrahead
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>$title</title>
$extrahead
END
;
if ($settings{'FX'} ne 'off') {
@@ -335,9 +331,14 @@ END
}
sub closepage () {
my $status = &connectionstatus();
$uptime = `/usr/bin/uptime`;
my $status = &connectionstatus();
my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
$uptime =~ s/year(s|)/$Lang::tr{'year'}/;
$uptime =~ s/month(s|)/$Lang::tr{'month'}/;
$uptime =~ s/day(s|)/$Lang::tr{'day'}/;
$uptime =~ s/user(s|)/$Lang::tr{'user'}/;
$uptime =~ s/load average/$Lang::tr{'uptime load average'}/;
print <<END
</div>
</div>

View File

@@ -249,7 +249,7 @@ position: relative;
{
position: relative;
font-size: 1.7em;
padding-bottom: 1.2em;
padding-bottom: 0.4em;
}
#main_inner .post ul.post_info
@@ -433,3 +433,9 @@ max-width: 2.5em;
position: relative;
width: 100%;
}
/* FOOTER COLORIZE BANDWIDTH */
#rx_kbs { color: green; }
#tx_kbs { color: red; }

View File

@@ -143,14 +143,12 @@ sub openpage {
}
print <<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>$title</title>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>$title</title>
$extrahead
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
END
;
if ($settings{'FX'} ne 'off') {
@@ -179,66 +177,53 @@ END
;
if ($settings{'SPEED'} ne 'off') {
print <<END
<script type="text/javascript" language="javascript">
var http_request = false;
function LoadInetInfo(url) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
// zu dieser Zeile siehe weiter unten
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
return false;
}
http_request.onreadystatechange = DisplayInetInfo;
http_request.open('GET', url, true);
http_request.send(null);
}
function DisplayInetInfo() {
if (http_request.readyState == 4) {
var xmldoc = http_request.responseXML;
var root1_node = xmldoc.getElementsByTagName('rx_kbs').item(0);
var root2_node = xmldoc.getElementsByTagName('tx_kbs').item(0);
var root3_node = xmldoc.getElementsByTagName('rxb').item(0);
var root4_node = xmldoc.getElementsByTagName('txb').item(0);
document.forms['speed'].txkb.value = root1_node.firstChild.data;
document.forms['speed'].rxkb.value = root2_node.firstChild.data;
// document.getElementsByTagName("input")[0].style.color = "#00FF00";
url = "/cgi-bin/speed.cgi?rxb_last=" + root3_node.firstChild.data + "&txb_last=" + root4_node.firstChild.data;
window.setTimeout("LoadInetInfo(url)", 3000);
}
}
</script>
<script type="text/javascript" src="/include/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
var t_current;
var t_last;
var rxb_current;
var rxb_last;
var txb_current;
var txb_last;
function refreshInetInfo() {
\$.ajax({
url: '/cgi-bin/speed.cgi',
success: function(xml){
t_current = new Date();
var t_diff = t_current - t_last;
t_last = t_current;
rxb_current = \$("rxb",xml).text();
var rxb_diff = rxb_current - rxb_last;
rxb_last = rxb_current;
var rx_kbs = rxb_diff/t_diff;
rx_kbs = Math.round(rx_kbs*10)/10;
txb_current = \$("txb",xml).text();
var txb_diff = txb_current - txb_last;
txb_last = txb_current;
var tx_kbs = txb_diff/t_diff;
tx_kbs = Math.round(tx_kbs*10)/10;
\$("#rx_kbs").text(rx_kbs + ' kb/s');
\$("#tx_kbs").text(tx_kbs + ' kb/s');
}
});
window.setTimeout("refreshInetInfo()", 3000);
}
\$(document).ready(function(){
refreshInetInfo();
});
</script>
</head>
<body onLoad="LoadInetInfo('/cgi-bin/speed.cgi')">
<body>
END
;
}
else {
print "</head><body>";}
print "</head>\n<body>";}
print <<END
<!-- IPFIRE HEADER -->
@@ -291,14 +276,12 @@ sub openpagewithoutmenu {
}
print <<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>$title</title>
$extrahead
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>$title</title>
$extrahead
END
;
if ($settings{'FX'} ne 'off') {
@@ -348,9 +331,14 @@ END
}
sub closepage () {
my $status = &connectionstatus();
$uptime = `/usr/bin/uptime`;
my $status = &connectionstatus();
my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
$uptime =~ s/year(s|)/$Lang::tr{'year'}/;
$uptime =~ s/month(s|)/$Lang::tr{'month'}/;
$uptime =~ s/day(s|)/$Lang::tr{'day'}/;
$uptime =~ s/user(s|)/$Lang::tr{'user'}/;
$uptime =~ s/load average/$Lang::tr{'uptime load average'}/;
print <<END
</div>
</div>
@@ -375,10 +363,9 @@ END
if ($settings{'SPEED'} ne 'off') {
print <<END
<br />
<form name='speed'>
<b>$Lang::tr{'bandwidth usage'}:</b> $Lang::tr{'incoming'}:<input type="text" name="rxkb" size="5" value="0 kb/s" style="font-size: 12px; font-family: Arial, Helvetica;text-align: center;color:green; border: none; padding: 0; background-color: #000000; vertical-align: middle" />
$Lang::tr{'outgoing'}: <input type="text" name="txkb" size="5" value="0 kb/s" style="font-size: 12px; font-family: Arial, Helvetica;text-align: center;color:red; border: none; padding: 0; background-color: #000000; vertical-align: middle"/>
</form>
<b>$Lang::tr{'bandwidth usage'}:</b>
$Lang::tr{'incoming'}: <span id="rx_kbs"></span>&nbsp;$Lang::tr{'outgoing'}: <span id="tx_kbs"></span>
END
;
}

View File

@@ -227,13 +227,13 @@ padding-top: 3.5em;
{
border-bottom: dotted 1px #E1E1E1;
position: relative;
padding-bottom: 0.4em;
}
#main_inner h3
{
font-size: 2.1em;
padding-bottom: 0.1em;
margin-bottom: 0.8em;
}
#main_inner h4
@@ -253,7 +253,7 @@ position: relative;
{
position: relative;
font-size: 1.7em;
padding-bottom: 1.2em;
padding-bottom: 0.4em;
}
#main_inner .post ul.post_info
@@ -462,3 +462,9 @@ max-width: 2.5em;
position: relative;
width: 100%;
}
/* FOOTER COLORIZE BANDWIDTH */
#rx_kbs { color: green; }
#tx_kbs { color: red; }

View File

@@ -6,6 +6,11 @@
'Add Port Rule' => 'Port-Regel hinzufügen',
'Add Rule' => 'Regel hinzufügen',
'Add a route' => 'Eine Route hinzufügen',
'age smin' => 'Min.',
'age ssec' => 'Sek.',
'age second' => 'Sekunde',
'age seconds' => 'Sekunden',
'age shour' => 'Std.',
'Async logging enabled' => 'Aktiviere asynchrones Schreiben des Syslogs',
'Choose Rule' => 'Wählen Sie <u>eine</u> der untenstehenden Regeln aus.',
'Class' => 'Klasse',
@@ -1927,6 +1932,8 @@
'upstream password' => 'Proxy-Passwort:',
'upstream proxy host:port' => 'Vorgelagerter Proxy (hostname:port)',
'upstream username' => 'Proxy-Benutzername:',
'uptime' => 'Betriebszeit',
'uptime load average' => 'Ø Systemlast',
'uptime and users' => 'Uptime und Benutzer:',
'url filter' => 'URL-Filter',
'urlfilter access' => 'Zugriff',

View File

@@ -6,6 +6,11 @@
'Add Port Rule' => 'Add port rule',
'Add Rule' => 'Add rule',
'Add a route' => 'Add a route',
'age smin' => 'min',
'age ssec' => 'sec',
'age second' => 'second',
'age seconds' => 'seconds',
'age shour' => 'h',
'Async logging enabled' => 'Enable asynchronous writing of the syslog file',
'Choose Rule' => 'Choose <u>one</u> of the following rules.',
'Class' => 'Class',
@@ -1960,6 +1965,8 @@
'upstream password' => 'Upstream password:',
'upstream proxy host:port' => 'Upstream proxy (host:port)',
'upstream username' => 'Upstream username:',
'uptime' => 'Uptime',
'uptime load average' => '<27> Load average',
'uptime and users' => 'Uptime and users:',
'url filter' => 'Content Filter',
'urlfilter access' => 'Access',

View File

@@ -25,7 +25,7 @@
NAME="IPFire" # Software name
SNAME="ipfire" # Short name
VERSION="2.13" # Version number
CORE="67" # Core Level (Filename)
CORE="68" # Core Level (Filename)
PAKFIRE_CORE="67" # Core Level (PAKFIRE)
GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch
SLOGAN="www.ipfire.org" # Software slogan