mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Merge branch 'core68' into next
Conflicts: make.sh
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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($) {
|
||||
|
||||
17
config/rootfiles/core/68/exclude
Normal file
17
config/rootfiles/core/68/exclude
Normal 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
|
||||
9
config/rootfiles/core/68/filelists/files
Normal file
9
config/rootfiles/core/68/filelists/files
Normal 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
|
||||
1
config/rootfiles/core/68/meta
Normal file
1
config/rootfiles/core/68/meta
Normal file
@@ -0,0 +1 @@
|
||||
DEPS=""
|
||||
59
config/rootfiles/core/68/update.sh
Normal file
59
config/rootfiles/core/68/update.sh
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user