Hinzugefügt:

* Nochmal ein neues Shutdown-Bild.
  * Schnelle Profilauswahl in der index.cgi
  * Nettraffic.
  * Capiinfo.
Geändert:
  * Menü komplett neu sortiert.
  * Javascript-Option aus gui.cgi entfernt.
  * Pakfire-Fehler beseitigt.
  * Sämtliche /var/ipcop durch /var/ipfire ersetzt.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@129 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-05-21 20:54:29 +00:00
parent b34fd95d16
commit 10a04d70a4
22 changed files with 2431 additions and 1248 deletions

View File

@@ -1,42 +1,42 @@
IPCop - The Bad Packets Stop Here (VERSION)
------------------------------------------
Installation
------------
Please read the IPCop Installation PDF before installing the firewall.
This document is located in the \doc directory on the cdrom. It will
guide you through the installation process and will help you make the
necessary decisions during the installation process.
DOS Image utility tools
-----------------------
The dosutils directory contains the following DOS and Windows applications,
please use with caution and please can we draw your attention to the
documentation on the IPCop CD or install image on your network drive.
We also draw your attention to the disclaimer of Warranty below.
rawrite.exe - rawrite executable
rawwritewin.exe - rawwrite for Windows
diskio.dll - this MUST be in the same directory as rawrite for Windows
copying.txt - text file
License
-------
Please read the file COPYING for more information on the license.
Disclaimer of Warranty
----------------------
Users of this software must accept this disclaimer of warranty: "This
software is supplied AS IS. IPCop disclaims all warranties, expressed
or implied, including, without limitation, the warranties of merchantability
and of fitness for any purpose. IPCop assumes no liability for
damages, direct or consequential, which may result from the use of this
software."
IPFire - We secure your network (VERSION)
------------------------------------------
Installation
------------
Please read the IPFire Installation manual before installing the firewall.
This document is located in the \doc directory on the cdrom. It will
guide you through the installation process and will help you make the
necessary decisions during the installation process.
DOS Image utility tools
-----------------------
The dosutils directory contains the following DOS and Windows applications,
please use with caution and please can we draw your attention to the
documentation on the IPFire CD or install image on your network drive.
We also draw your attention to the disclaimer of Warranty below.
rawrite.exe - rawrite executable
rawwritewin.exe - rawwrite for Windows
diskio.dll - this MUST be in the same directory as rawrite for Windows
copying.txt - text file
License
-------
Please read the file COPYING for more information on the license.
Disclaimer of Warranty
----------------------
Users of this software must accept this disclaimer of warranty: "This
software is supplied AS IS. IPFire disclaims all warranties, expressed
or implied, including, without limitation, the warranties of merchantability
and of fitness for any purpose. IPFire assumes no liability for
damages, direct or consequential, which may result from the use of this
software."

View File

@@ -1,20 +1,21 @@
var/ipcop/backup/*.system
var/ipcop/backup/backup.key
var/ipcop/backup/sets
var/ipcop/countries.pl
var/ipcop/dhcpc
var/ipcop/eciadsl/modems.db
var/ipcop/eciadsl/firmware00.bin
var/ipcop/header.pl
var/ipcop/general-functions.pl
var/ipcop/lang.pl
var/ipcop/key
var/ipcop/langs
var/ipcop/patches
var/ipcop/ppp/fake-resolv.conf
var/ipcop/red
var/ipcop/time/counter
var/ipcop/firewall/protocols.pl
var/ipcop/firewall/defaultservices
var/ipcop/firewall/icmptypes
var/ipcop/addon-lang
var/ipfire/backup/*.system
var/ipfire/backup/backup.key
var/ipfire/backup/sets
var/ipfire/countries.pl
var/ipfire/dhcpc
var/ipfire/eciadsl/modems.db
var/ipfire/eciadsl/firmware00.bin
var/ipfire/header.pl
var/ipfire/general-functions.pl
var/ipfire/lang.pl
var/ipfire/key
var/ipfire/langs
var/ipfire/patches
var/ipfire/ppp/fake-resolv.conf
var/ipfire/red
var/ipfire/time/counter
var/ipfire/firewall/protocols.pl
var/ipfire/firewall/defaultservices
var/ipfire/firewall/icmptypes
var/ipfire/addon-lang
var/ipfire/net-traffic

View File

@@ -1 +1 @@
var/ipcop/ethernet/settings
var/ipfire/ethernet/settings

View File

@@ -13,4 +13,4 @@
/etc/ssh/ssh_host_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
/var/ipcop/
/var/ipfire/

View File

@@ -9,8 +9,6 @@
# Copyright (c) 2002/08/23 Mark Wormgoor <mark@wormgoor.com> validfqdn()
# Copyright (c) 2003/09/11 Darren Critchley <darrenc@telus.net> srtarray()
#
# $Id: header.pl,v 1.34.2.39 2004/11/26 15:51:27 alanh Exp $
#
package Header;
use CGI();
@@ -19,15 +17,6 @@ use Time::Local;
$|=1; # line buffering
sub get_version() {
my $read_ver = `cat /etc/ipfire-release`;
if ($read_ver =~ /^$/) {
return "IPFire (unknown version)";
}
return $read_ver;
}
$Header::version = get_version();
$Header::revision = 'final';
$Header::swroot = '/var/ipfire';
$Header::pagecolour = '#ffffff';
@@ -139,43 +128,37 @@ sub genmenu {
'title' => "$tr{'network configuration'}",
'enabled' => 1,
};
$subsystem->{'03.updates'} = {
'caption' => $tr{'updates'},
'uri' => '/cgi-bin/updates.cgi',
'title' => "$tr{'updates'}",
'enabled' => 0,
};
$subsystem->{'04.passwords'} = {
$subsystem->{'03.passwords'} = {
'caption' => $tr{'sspasswords'},
'uri' => '/cgi-bin/changepw.cgi',
'title' => "$tr{'sspasswords'}",
'enabled' => 1,
};
$subsystem->{'05.ssh'} = {
$subsystem->{'04.ssh'} = {
'caption' => $tr{'ssh access'},
'uri' => '/cgi-bin/remote.cgi',
'title' => "$tr{'ssh access'}",
'enabled' => 1,
};
$subsystem->{'06.gui'} = {
$subsystem->{'05.gui'} = {
'caption' => $tr{'gui settings'},
'uri' => '/cgi-bin/gui.cgi',
'title' => "$tr{'gui settings'}",
'enabled' => 1,
};
$subsystem->{'07.backup'} = {
$subsystem->{'06.backup'} = {
'caption' => $tr{'backup'},
'uri' => '/cgi-bin/backup.cgi',
'title' => "$tr{'backup'} / $tr{'restore'}",
'enabled' => 0,
};
$subsystem->{'08.shutdown'} = {
$subsystem->{'07.shutdown'} = {
'caption' => $tr{'shutdown'},
'uri' => '/cgi-bin/shutdown.cgi',
'title' => "$tr{'shutdown'} / $tr{'reboot'}",
'enabled' => 1,
};
$subsystem->{'09.credits'} = {
$subsystem->{'08.credits'} = {
'caption' => $tr{'credits'},
'uri' => '/cgi-bin/credits.cgi',
'title' => "$tr{'credits'}",
@@ -256,36 +239,61 @@ sub genmenu {
'title' => "$tr{'external aliases configuration'}",
'enabled' => 1,
};
$subnetwork->{'05.nettraf'} = {
'caption' => '$tr{'sstraffic'}',
'uri' => '/cgi-bin/traffic.cgi',
'title' => "$tr{'sstraffic'}",
'enabled' => 1,
};
$subnetwork->{'06.openvpn'} = {
'caption' => 'OpenVPN',
'uri' => '/cgi-bin/ovpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
$subnetwork->{'07.ipsec'} = {
'caption' => 'IPSec,
'uri' => '/cgi-bin/vpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
my %subserviceshash = ();
my $subservices = \%subserviceshash;
$subservices->{'01.dhcp'} = {
$subservices->{'01.proxy'} = {
'caption' => $tr{'proxy'},
'uri' => '/cgi-bin/proxy.cgi',
'title' => "HTTP: $tr{'web proxy configuration'}",
'enabled' => 1,
};
$subservices->{'02.dhcp'} = {
'caption' => $tr{'dhcp server'},
'uri' => '/cgi-bin/dhcp.cgi',
'title' => "$tr{'dhcp configuration'}",
'enabled' => 1,
};
$subservices->{'02.dyndns'} = {
$subservices->{'03.dyndns'} = {
'caption' => $tr{'dynamic dns'},
'uri' => '/cgi-bin/ddns.cgi',
'title' => "$tr{'dynamic dns client'}",
'enabled' => 1,
};
$subservices->{'03.time'} = {
$subservices->{'04.time'} = {
'caption' => $tr{'time server'},
'uri' => '/cgi-bin/time.cgi',
'title' => "$tr{'time server'}",
'enabled' => 1,
};
$subservices->{'04.shaping'} = {
'caption' => $tr{'traffic shaping'},
'uri' => '/cgi-bin/shaping.cgi',
$subservices->{'05.qos'} = {
'caption' => 'Quality of Service',
'uri' => '/cgi-bin/qos.cgi',
'title' => "$tr{'traffic shaping settings'}",
'enabled' => 1,
};
$subservices->{'05.ids'} = {'caption' => $tr{'intrusion detection'},
$subservices->{'06.ids'} = {'caption' => $tr{'intrusion detection'},
'enabled' => 1,
'uri' => '/cgi-bin/ids.cgi',
'title' => "$tr{'intrusion detection system'} (Snort)",
@@ -322,87 +330,6 @@ sub genmenu {
};
my %subhttphash = ();
my $subhttp = \%subhttphash;
$subhttp->{'01.proxy'} = {
'caption' => $tr{'proxy'},
'uri' => '/cgi-bin/advproxy.cgi',
'title' => "HTTP: $tr{'web proxy configuration'}",
'enabled' => 1,
};
$subhttp->{'02.contentfilter'} = {
'caption' => $tr{'content filter'},
'uri' => '/cgi-bin/dansguardian.cgi',
'title' => "HTTP: $tr{'content filter'}",
'enabled' => 1,
};
$subhttp->{'03.antivirus'} = {
'caption' => $tr{'antivirus'},
'uri' => '/cgi-bin/httpantivirus.cgi',
'title' => "HTTP: $tr{'antivirus'}",
'enabled' => 1,
};
$subhttp->{'04.proxymanagment'} = {
'caption' => $tr{'DS Managment'},
'uri' => '/cgi-bin/proxygm.cgi',
'title' => "HTTP: $tr{'DS Managment'}",
'enabled' => 1,
};
$subhttp->{'05.activatedgroups'} = {
'caption' => $tr{'activated Groups'},
'uri' => '/cgi-bin/proxyag.cgi',
'title' => "HTTP: $tr{'activated Groups'}",
'enabled' => 1,
};
$subhttp->{'06.advancedproxy'} = {
'caption' => $tr{'Proxy Advanced'},
'uri' => '/cgi-bin/proxyad.cgi',
'title' => "HTTP: $tr{'Proxy Advanced'}",
'enabled' => 1,
};
my %subproxyhash = ();
my $subproxy = \%subproxyhash;
$subproxy->{'01.http'} = {'caption' => $tr{'HTTP'},
'enabled' => 1,
'subMenu' => $subhttp
};
$subproxy->{'02.ftp'} = {'caption' => 'FTP',
'enabled' => 1,
'subMenu' => $subftp
};
my %subopenvpnhash = ();
my $subopenvpn = \%subopenvpnhash;
$subopenvpn->{'01.server'} = {'caption' => $tr{'openvpn'},
'uri' => '/cgi-bin/openvpn.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
$subopenvpn->{'02.client'} = {'caption' => $tr{'openvpnclient'},
'uri' => '/cgi-bin/openvpnclient.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
my %subvpnhash = ();
my $subvpn = \%subvpnhash;
$subvpn->{'01.openvpn'} = {'caption' => $tr{'openvpn'},
'subMenu' => $subopenvpn,
'enabled' => 1,
};
$subvpn->{'02.ipsec'} = {'caption' => $tr{'ipsec'},
'uri' => '/cgi-bin/vpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
my %sublogshash = ();
my $sublogs = \%sublogshash;
@@ -465,11 +392,21 @@ sub genmenu {
'title' => "$tr{'paketmanager'}",
'enabled' => 1,
};
$subipfire->{'02.asterisk'} = {'caption' => $tr{'asterisk'},
'uri' => '/cgi-bin/asterisk.cgi',
'title' => "$tr{'asterisk'}",
'enabled' => 1,
};
$subipfire->{'02.samba'} = {'caption' => $tr{'samba'},
'uri' => '/cgi-bin/samba.cgi',
'title' => "$tr{'samba'}",
'enabled' => 1,
};
$subipfire->{'99.help'} = {'caption' => $tr{'help'},
'uri' => '/cgi-bin/help.cgi',
'title' => "$tr{'help'}",
'enabled' => 1,
};
@@ -497,7 +434,7 @@ sub genmenu {
'enabled' => 1,
'subMenu' => $subproxy
};
$menu->{'07.vpn'} = {'caption' => 'VPN',
$menu->{'07.ipfire'} = {'caption' => 'IPFire',
'enabled' => 1,
'subMenu' => $subvpn
};
@@ -505,12 +442,6 @@ sub genmenu {
'enabled' => 1,
'subMenu' => $sublogs
};
$menu->{'09.ipfire'} = {'caption' => 'IPFire',
'enabled' => 1,
'subMenu' => $subipfire
};
if (! blue_used() && ! orange_used()) {
$menu->{'05.firewall'}{'subMenu'}->{'03.dmz'}{'enabled'} = 0;
@@ -876,7 +807,6 @@ sub closepage () {
<p>
<div style="font-size: 9px"><b>Status:</b> $status <b>Uptime:</b>$uptime</div>
</p>
<p><a href="http://www.ipfire.org">IPFire</a> $version (c)</p>
</div>
</body>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0,Transition=12)">

View File

@@ -0,0 +1,498 @@
#!/usr/bin/perl
#
# $Id: net-traffic-lib.pl,v 1.4 2005/03/17 11:43:55 dotzball Exp $
#
# Summarize all IP accounting files from start to end time
#
# Copyright (C) 1997 - 2000 Moritz Both
# 2001 - 2002 Al Zaharov
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# The author can be reached via email: moritz@daneben.de, or by
# snail mail: Moritz Both, Im Moore 26, 30167 Hannover,
# Germany. Phone: +49-511-1610129
#
#
# 22 June 2004 By Achim Weber dotzball@users.sourceforge.net
# - changed to use it with Net-Traffic Addon
# - renamed to avoid issues when calling this file or original ipacsum
# - this file is net-traffic-lib.pl for IPCop 1.4.0
#
package Traffic;
use 5.000;
use Getopt::Long;
use POSIX qw(strftime);
use Time::Local;
use Socket;
use IO::Handle;
$|=1; # line buffering
@moff = (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 );
# =()<$datdelim="@<DATDELIM>@";>()=
$datdelim="#-#-#-#-#";
# =()<$prefix="@<prefix>@";>()=
$prefix="/usr";
# =()<$exec_prefix="@<exec_prefix>@";>()=
$exec_prefix="${prefix}";
# =()<$INSTALLPATH="@<INSTALLPATH>@";>()=
$INSTALLPATH="${exec_prefix}/sbin";
$datdir="/var/log/ip-acct";
$me=$0;
$me =~ s|^.*/([^/]+)$|$1|;
$now = time;
$fetchipac="$INSTALLPATH/fetchipac";
$rule_regex = ".*"; # match rules with this regex only
## Net-Traffic variables ##
my %allDays = ();
my $allDaysBytes;
my $tzoffset = 0;
my $displayMode = "daily";
my ($curMonth, $curYear);
${Traffic::blue_in} = 'incoming BLUE';
${Traffic::green_in} = 'incoming GREEN';
${Traffic::orange_in} = 'incoming ORANGE';
${Traffic::red_in} = 'incoming RED';
${Traffic::blue_out} = 'outgoing BLUE';
${Traffic::green_out} = 'outgoing GREEN';
${Traffic::orange_out} = 'outgoing ORANGE';
${Traffic::red_out} = 'outgoing RED';
sub calcTraffic{
$allDaysBytes = shift;
$starttime = shift;
$endtime = shift;
$displayMode = shift;
$starttime =~ /^(\d\d\d\d)(\d\d)/;
$curYear = $1;
$curMonth = $2;
# calculate time zone offset in seconds - use difference of output of date
# command and time function, round it
$tzoffset = time-timegm(localtime());
$machine_name = undef;
$starttime = makeunixtime($starttime);
$endtime = makeunixtime($endtime);
$endtime -= 1;
# options that we need to pass to fetchipac if we call it.
$fetchipac_options = "--directory=$datdir";
$endtime = $now if ($endtime > $now);
$starttime = 0 if ($starttime < 0);
$mystarttime = &makemydailytime($starttime);
$myendtime = &makemydailytime($endtime);
%rule_firstfile = %rule_lastfile = ( );
# find out which timestamps we need to read.
# remember newest timestamp before starttime so we know when data for
# the first file starts
# also remember oldest timestamp after end time
$newest_timestamp_before_starttime = "";
$oldest_timestamp_after_endtime = "";
open(DATA, "$fetchipac $fetchipac_options --timestamps=$starttime,$endtime ".
"--machine-output-format|") || die "$me: cant run $fetchipac\n";
# the first thing is the timestamp count
$count=<DATA>;
if ($count == 0) {
return ();
}
while(<DATA>)
{
if (/^(.)\s(\d+)$/) {
my $ts = $2;
if ($1 eq "-") {
$newest_timestamp_before_starttime=$ts;
}
elsif ($1 eq "+") {
$oldest_timestamp_after_endtime=$ts;
}
elsif ($1 eq "*") {
push(@timestamps, $ts);
}
else {
die "$me: illegal output from $fetchipac: \"$_\"\n";
}
}
else {
die "$me: illegal output from $fetchipac: \"$_\"\n";
}
}
close DATA;
push(@timestamps, $oldest_timestamp_after_endtime)
if ($oldest_timestamp_after_endtime);
unshift(@timestamps, $newest_timestamp_before_starttime)
if ($newest_timestamp_before_starttime);
$rulenumber = 0;
# read all data we need and put the data into memory.
&read_data;
@days_sorted = sort keys %allDays;
return @days_sorted;
}
##########################
# END OF MAIN PROGRAM
##########################
# read all data (@timestmaps contains the timestamps, must be sorted!)
# and put the data into our global memory data
# structures. special care must be taken with data of the first and
# the last timestamps we read, since we only want data which is from our
# time frame. Furthermore, data from before and after this time frame
# must be preserved in special data structures because we might replace
# them (option --replace) and have to write extra data for these times
# then.
sub read_data {
my $run_s;
my $s;
my $i;
my $in_time = 0;
my $after_time = 0;
my $curDay = $starttime;
# feed the timestamp list to fetchipac on its stdin.
socketpair(CHILD, PARENT, AF_UNIX, SOCK_STREAM, PF_UNSPEC)
or die "socketpair: $!";
CHILD->autoflush(1);
PARENT->autoflush(1);
my $pid = open(CHILD, "-|");
die "$me: can't fork: $!\n" unless defined $pid;
if ($pid == 0) {
# child
close CHILD;
open(FETCHIPAC, "|$fetchipac $fetchipac_options --record "
."--machine-output-format")
or die "$me: cant exec fetchipac\n";
#this is much more efficient than the original code (Manfred Weihs)
# and it adds more troubles than solves (Al Zakharov)
if ($timestamps[0] == $newest_timestamp_before_starttime) {
print(FETCHIPAC $timestamps[1],"-",$timestamps[$count],"\n");
} else {
print(FETCHIPAC $timestamps[0],"-",$timestamps[$count-1],"\n");
}
close(FETCHIPAC);
close(PARENT);
exit;
}
close PARENT;
my $laststamp = undef;
$laststamp = $newest_timestamp_before_starttime
if ($newest_timestamp_before_starttime);
$i = 0;
$i++ if ($laststamp);
while (<CHILD>) {
# first line of fetchipac output: "ADD"
/^ADD\s*$/i or die "$me: bad line from fetchipac: $_\n";
# second line of fetchipac output: timestamp no_of_records
$_ = <CHILD> || last;
/^(\d+)\s(\d+)$/ or die "$me: bad line from fetchipac: $_\n";
my $timestamp = int $1;
my $number_of_records = int $2;
my $do_collect = 1;
if ($displayMode =~ /^daily/) {
# increment Day aslong current timestamp is not in current Day
while ( ($timestamp-$curDay) > 86399) {
$curDay += 86400;
}
}
else
{
my @dummy = localtime($timestamp);
# increment Month aslong current timestamp is not in current Month
while ($curMonth < ($dummy[4]+1) || $curYear<($dummy[5]+1900)) {
$curMonth++;
if ($curMonth > 12) {
$curMonth = 1;
$curYear++;
}
my $newMonth = $curYear;
$newMonth .= $curMonth < 10 ? "0".$curMonth."01" : $curMonth."01";
$newMonth .= "01";
$curDay = &makeunixtime($newMonth);
}
}
if ($timestamp < $starttime) {
# this record is too old, we dont need the data.
# However, the timestamp gives us a clue on the
# time period the next item covers.
$do_collect = 0;
}
my $irec;
# read each record
my $data = &read_data_record(CHILD, $number_of_records);
if ($do_collect && $in_time == 0) {
# the data is from after starttime. if it is the
# first one, split the data (if we know for how
# long this data is valid, and if $laststamp is not
# equal to $starttime in which case the split is
# redundant). If we don't have a clue about the
# last file time before our first file was created,
# we do not know how much of the file data is in our
# time frame. we assume everything belongs to us.
$in_time = 1;
# if ($laststamp && $laststamp != $starttime) {
if ($laststamp && $laststamp != $newest_timestamp_before_starttime) {
my $newdata = &split_data($data,
$laststamp, $timestamp, $starttime);
$glb_data_before = $data;
$data = $newdata;
$laststamp = $starttime;
}
}
if ($timestamp > $endtime) {
# this data is too new, but the data in it may have
# begun within our time frame. (if endtime eq laststamp
# we do a redundant split here, too - it works for now
# and --replace relies on it, but it is ugly.)
if ($after_time == 0) {
$after_time = 1;
if ($laststamp) {
$glb_data_after =
&split_data($data,$laststamp,$timestamp,$endtime);
} else {
$do_collect = 0;
}
} else {
$do_collect = 0; # just too new.
}
}
if ($do_collect) {
&collect_data($data, $i, $curDay);
}
$laststamp = $timestamp;
$i++;
}
close CHILD;
wait;
}
# split the data in $1 (format as from read_data) into a pair of two
# such data sets. The set referenced to as $1 will afterwards contain
# the first part of the data, another set which is returned contains
# the second part of the data.
# interpret the data as having start time=$2 and end time=$3 and split
# time=$4
sub split_data {
my $data = shift;
my $mstart = shift;
my $mend = shift;
my $msplit = shift;
# calculate factors for multiplications
my $ust = $mstart;
my $uperiod = $mend - $ust;
my $usplit = $msplit - $ust;
if ($uperiod < 0) {
# hmmm? die Daten sind rueckwaerts???
$uperiod = -$uperiod;
}
my $fac1;
if ($usplit < 0) {
$fac1 = 0;
}
elsif ($usplit > $uperiod) {
$fac1 = 1;
}
else {
$fac1 = $usplit / $uperiod;
}
# $fac1 now says us how much weight the first result has.
# initialize the set we will return.
my @ret = ( );
foreach $set (@$data) {
my ($rule, $bytes, $pkts) = @$set;
$$set[1] = int($bytes * $fac1 + 0.5);
$$set[2] = int($pkts * $fac1 + 0.5);
push(@ret, [ $rule, $bytes - $$set[1], $pkts - $$set[2] ]);
}
return \@ret;
}
# put data from one file into global data structures
# must be called in correct sorted file name order to set rules_lastfile
# and rules_firstfile (which are currently useless)
# arguments:
# $1=index number of file; $2 = reference to array with data from file
sub collect_data {
my($filedata, $ifile, $i, $day);
$filedata = shift;
$ifile=shift;
$day =shift;
# if day first appeared in this file, initialize its
# life.
if (!defined($allDays{$day})) {
return if (&init_filter_id($day));
$allDays{$day} = $rulenumber++;
}
for ($i=0; $i<=$#$filedata; $i++) {
my $set = $$filedata[$i];
my $rule = $$set[0];
my $bytes = $$set[1];
my $pkts = $$set[2];
$_ = $rule;
/^(.*) \(.*$/;
$_ = $1;
/^forwarded (.*)$/;
$rule = $1;
$allDaysBytes->{$day}{$rule} += $bytes;
}
}
# initialize data variables for a new rule - if it is new
sub init_filter_id {
my($s, $ifile) = @_;
if (!defined $allDaysBytes->{$s}) {
if ($displayMode =~ /^daily/) {
my $newDay = &makemydailytime($s);
$newDay =~ /^\d\d\d\d-(\d\d)-\d\d$/;
return 1 if ($1 > $curMonth && $displayMode ne "daily_multi");
$allDaysBytes->{$s}{'Day'} = $newDay;
}
else {
$allDaysBytes->{$s}{'Day'} = &makemymonthlytime($s);
}
$allDaysBytes->{$s}{${Traffic::blue_in}} = int(0);
$allDaysBytes->{$s}{${Traffic::green_in}} = int(0);
$allDaysBytes->{$s}{${Traffic::orange_in}} = int(0);
$allDaysBytes->{$s}{${Traffic::red_in}} = int(0);
$allDaysBytes->{$s}{${Traffic::blue_out}} = int(0);
$allDaysBytes->{$s}{${Traffic::green_out}} = int(0);
$allDaysBytes->{$s}{${Traffic::orange_out}} = int(0);
$allDaysBytes->{$s}{${Traffic::red_out}} = int(0);
}
return 0;
}
# read data record from filehandle $1
# number of records is $2
# Return value: reference to array a of length n;
# n is the number of rules
# each field in a is an array aa with 3 fields
# the fields in arrays aa are: [0]=name of rule; [1]=byte count;
# [2]=packet count
# function does not use global variables
sub read_data_record {
my($file, $number_of_records, $beforedata, $indata, $i, $irec);
my($pkts, $bytes, $rule);
my(@result);
$file=shift;
$number_of_records = shift;
$indata=0;
$beforedata=1;
for($irec = 0; $irec < $number_of_records; $irec++) {
$_ = <$file>;
chop;
/^\(\s*(.*)$/ or die "$me: bad line from fetchipac (expecting machine name): $_\n";
$machine_name = $1; # remember final machine name
while(<$file>) {
last if (/^\)$/); # terminating line ')'
/^(\d+)\s(\d+)\s\|(.*)\|$/
or die "$me: bad line from fetchipac (expecting rule item): $_\n";
$bytes = $1;
$pkts = $2;
$rule = $3;
if ($rule =~ /$rule_regex/) {
push(@result, [ $rule, $bytes, $pkts]);
}
}
}
# read another emtpy line (data format consistency)
$_ = <$file>;
die "$me: bad data from fetchipac (expected emtpy line): $_\n"
if ($_ !~ /^$/);
\@result;
}
# given a string in format YYYYMMDD[hh[mm[ss]]], make unix time
# use time zone offset $tzoffset (input=wall clock time, output=UTC)
sub makeunixtime {
my($y, $m, $d, $h, $i, $e);
$s = shift;
$h=0; $i=0; $e=0;
if ($s =~ /^(\d\d\d\d)(\d\d)(\d\d)/) {
($y, $m, $d) = ($1, $2, $3);
if ($s =~ /^\d\d\d\d\d\d\d\d-?(\d\d)/) {
$h=$1;
if ($s =~ /^\d\d\d\d\d\d\d\d-?\d\d(\d\d)/) {
$i=$1;
if ($s =~ /^\d\d\d\d\d\d\d\d-?\d\d\d\d(\d\d)/) {
$e=$1;
}
}
}
}
else {
return 0;
}
$y-=1970;
$s = (($y)*365) + int(($y+2)/4) + $moff[$m-1] + $d-1;
$s-- if (($y+2)%4 == 0 && $m < 3);
$s*86400 + $h*3600 + $i*60 + $e + $tzoffset;
}
# return the given unix time in localtime in "mydaily" time format
sub makemydailytime {
my($s)=shift;
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($s);
return sprintf("%04d-%02d-%02d", 1900+$year, $mon+1, $mday);
}
# return the given unix time in localtime in "mymonthly" time format
sub makemymonthlytime {
my($s)=shift;
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($s);
return sprintf("%04d-%02d", 1900+$year, $mon+1);
}
# EOF

View File

@@ -1,49 +1,49 @@
# Do not modify '/var/ipcop/proxy/squid.conf' directly since any changes
# you make will be overwritten whenever you resave proxy settings using the
# web interface! Instead, modify the file '/var/ipcop/proxy/acl' and then
# restart squid using the web interface. Changes made to the 'acl' file
# will propagate to the 'squid.conf' file at that time.
# [Scott Tregear, 22 Feb 2005]
# Uncomment the following line to enable logging of User-Agent header:
#useragent_log /var/log/squid/user_agent.log
# Uncomment the following line to enable logging of Referer header:
#referer_log /var/log/squid/referer.log
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port __PROXY_PORT__ # Squid port (for icons)
acl IPCop_http port 81
acl IPCop_https port 444
acl IPCop_ips dst __GREEN_IP__ __BLUE_IP__
acl IPCop_networks src __GREEN_NET__ __BLUE_NET__
acl CONNECT method CONNECT
##Access to squid:
#local machine, no restriction
http_access allow localhost
#GUI admin if local machine connects
http_access allow IPCop_ips IPCop_networks IPCop_http
http_access allow CONNECT IPCop_ips IPCop_networks IPCop_https
#Deny not web services
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#Finally allow IPCop_networks clients
http_access allow IPCop_networks
http_access deny all
# Do not modify '/var/ipfire/proxy/squid.conf' directly since any changes
# you make will be overwritten whenever you resave proxy settings using the
# web interface! Instead, modify the file '/var/ipfire/proxy/acl' and then
# restart squid using the web interface. Changes made to the 'acl' file
# will propagate to the 'squid.conf' file at that time.
# [Scott Tregear, 22 Feb 2005]
# Uncomment the following line to enable logging of User-Agent header:
#useragent_log /var/log/squid/user_agent.log
# Uncomment the following line to enable logging of Referer header:
#referer_log /var/log/squid/referer.log
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port __PROXY_PORT__ # Squid port (for icons)
acl IPCop_http port 81
acl IPCop_https port 444
acl IPCop_ips dst __GREEN_IP__ __BLUE_IP__
acl IPCop_networks src __GREEN_NET__ __BLUE_NET__
acl CONNECT method CONNECT
##Access to squid:
#local machine, no restriction
http_access allow localhost
#GUI admin if local machine connects
http_access allow IPCop_ips IPCop_networks IPCop_http
http_access allow CONNECT IPCop_ips IPCop_networks IPCop_https
#Deny not web services
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#Finally allow IPCop_networks clients
http_access allow IPCop_networks
http_access deny all

View File

@@ -1,3 +1,14 @@
------------------------------------------------------------------------
r128 | ms | 2006-05-20 13:34:29 +0200 (Sa, 20 Mai 2006) | 8 lines
Hinzugef<EFBFBD>gt:
* Pakfire in die ISO gepackt. (Welche nocheinmal kleiner geworden ist.)
* Neues Shutdown-Bild
Ge<EFBFBD>ndert:
* Zahlreiche Sch<63>nheitsfehler im Pakfire korrigiert. ^^
Gel<EFBFBD>scht:
* Ein kleines <20>berbleibsel vom IPCop entfernt.
------------------------------------------------------------------------
r127 | ms | 2006-05-20 11:34:19 +0200 (Sa, 20 Mai 2006) | 3 lines

View File

@@ -24,6 +24,41 @@ my %cgiparams=();
$cgiparams{'ACTION'} = '';
&Header::getcgihash(\%cgiparams);
if ($cgiparams{'ACTION'} eq $Lang::tr{'dial profile'})
{
my $profile = $cgiparams{'PROFILE'};
my %tempcgiparams = ();
$tempcgiparams{'PROFILE'} = '';
&General::readhash("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
\%tempcgiparams);
# make a link from the selected profile to the "default" one.
unlink("${General::swroot}/ppp/settings");
link("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
"${General::swroot}/ppp/settings");
system ("/bin/touch", "${General::swroot}/ppp/updatesettings");
# read in the new params "early" so we can write secrets.
%cgiparams = ();
&General::readhash("${General::swroot}/ppp/settings", \%cgiparams);
$cgiparams{'PROFILE'} = $profile;
$cgiparams{'BACKUPPROFILE'} = $profile;
&General::writehash("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
\%cgiparams);
# write secrets file.
open(FILE, ">/${General::swroot}/ppp/secrets") or die "Unable to write secrets file.";
flock(FILE, 2);
my $username = $cgiparams{'USERNAME'};
my $password = $cgiparams{'PASSWORD'};
print FILE "'$username' * '$password'\n";
chmod 0600, "${General::swroot}/ppp/secrets";
close FILE;
&General::log("$Lang::tr{'profile made current'} $tempcgiparams{'PROFILENAME'}");
$cgiparams{'ACTION'} = "$Lang::tr{'dial'}";
}
if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) {
system('/etc/rc.d/rc.red','start') == 0
or &General::log("Dial failed: $?"); }

View File

@@ -56,11 +56,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
goto SAVE_ERROR;
}
if ($cgiparams{'JAVASCRIPT'} !~ /^(on|off)$/) {
$errormessage = $Lang::tr{'invalid input'};
goto SAVE_ERROR;
}
# Set flag if index page is to refresh whilst ppp is up.
# Default is NO refresh.
if ($cgiparams{'REFRESHINDEX'} ne 'off') {
@@ -79,7 +74,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
# write cgi vars to the file.
$mainsettings{'LANGUAGE'} = $cgiparams{'lang'};
$mainsettings{'JAVASCRIPT'} = $cgiparams{'JAVASCRIPT'};
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
$mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
@@ -87,12 +81,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
&Lang::reload($cgiparams{'lang'});
SAVE_ERROR:
} else {
if ($mainsettings{'JAVASCRIPT'}) {
$cgiparams{'JAVASCRIPT'} = $mainsettings{'JAVASCRIPT'};
} else {
$cgiparams{'JAVASCRIPT'} = 'on';
}
if ($mainsettings{'WINDOWWITHHOSTNAME'}) {
$cgiparams{'WINDOWWITHHOSTNAME'} = $mainsettings{'WINDOWWITHHOSTNAME'};
} else {
@@ -115,16 +103,11 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
# Default settings
if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
{
$cgiparams{'JAVASCRIPT'} = 'on';
$cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
$cgiparams{'REFRESHINDEX'} = 'off';
}
$checked{'JAVASCRIPT'}{'off'} = '';
$checked{'JAVASCRIPT'}{'on'} = '';
$checked{'JAVASCRIPT'}{$cgiparams{'JAVASCRIPT'}} = "checked='checked'";
$checked{'WINDOWWITHHOSTNAME'}{'off'} = '';
$checked{'WINDOWWITHHOSTNAME'}{'on'} = '';
$checked{'WINDOWWITHHOSTNAME'}{$cgiparams{'WINDOWWITHHOSTNAME'}} = "checked='checked'";
@@ -154,10 +137,6 @@ print <<END
<tr>
<td colspan='2'><p><b>$Lang::tr{'display'}</b></td>
</tr>
<tr>
<td><input type='checkbox' name='JAVASCRIPT' $checked{'JAVASCRIPT'}{'on'} />
<td width='100%'>$Lang::tr{'enable javascript'}</td>
</tr>
<tr>
<td><input type='checkbox' name='WINDOWWITHHOSTNAME' $checked{'WINDOWWITHHOSTNAME'}{'on'} /></td>
<td>$Lang::tr{'display hostname in window title'}</td>

View File

@@ -180,24 +180,57 @@ print "</p>\n";
&Header::closebox();
# Test browser, and direct User where to turn off Javascript if necessary
# only display message if Javascript is currently enabled
if (${Header::javascript}) {
print <<END
<script type='text/javascript'>\n
if(navigator.platform.indexOf("MacPPC")>(-1)){
document.write(
"<center><p>"
+ "$Lang::tr{'javascript menu error1'}"
+ " <a href='/cgi-bin/gui.cgi'>$Lang::tr{'gui settings'}</a> "
+ "$Lang::tr{'javascript menu error2'}"
+ "</p></center>"
)
&Header::openbox('100%', 'left', $Lang::tr{'quick control'});
# read in the profile names into @profilenames.
my $c;
my $maxprofiles = 5;
my @profilenames = ();
for ($c = 1; $c <= $maxprofiles; $c++)
{
my %temppppsettings = ();
$temppppsettings{'PROFILENAME'} = '';
&General::readhash("${General::swroot}/ppp/settings-$c", \%temppppsettings);
$profilenames[$c] = $temppppsettings{'PROFILENAME'};
}
</script>
my %selected;
for ($c = 1; $c <= $maxprofiles; $c++) {
$selected{'PROFILE'}{$c} = '';
}
$selected{'PROFILE'}{$pppsettings{'PROFILE'}} = "selected='selected'";
print <<END;
<table width='100%'>
<tr>
<td align='left'>
<form method='post' action='/cgi-bin/dial.cgi'>
$Lang::tr{'profile'}:
<select name='PROFILE'>
END
;
my $dialButtonDisabled = "disabled='disabled'";
for ($c = 1; $c <= $maxprofiles; $c++)
{
if ($profilenames[$c] ne '') {
$dialButtonDisabled = "";
print "\t<option value='$c' $selected{'PROFILE'}{$c}>$c. $profilenames[$c]</option>\n";
}
}
$dialButtonDisabled = "disabled='disabled'" if (-e '/var/run/ppp-ipcop.pid' || -e "${General::swroot}/red/active");
print <<END;
</select>
<input type='submit' name='ACTION' value='$Lang::tr{'dial profile'}' $dialButtonDisabled />
</form>
</td>
<td align='right'>
<form method='post' action='/cgi-bin/shutdown.cgi'>
<input type='submit' name='ACTION' value='$Lang::tr{'shutdown'}' />
</form>
</td>
</tr>
</table>
END
&Header::closebox();
&Header::closebigbox();

297
html/cgi-bin/traffic.cgi Normal file
View File

@@ -0,0 +1,297 @@
#!/usr/bin/perl
#
# SmoothWall CGIs
#
# This code is distributed under the terms of the GPL
#
# (c) The SmoothWall Team
#
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require '/var/ipfire/net-traffic/net-traffic-lib.pl';
my %cgiparams;
my %pppsettings;
my %netsettings;
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
my @wday = ($Lang::tr{'wday1'}, $Lang::tr{'wday2'}, $Lang::tr{'wday3'}, $Lang::tr{'wday4'}, $Lang::tr{'wday5'}, $Lang::tr{'wday6'}, $Lang::tr{'wday7'});
my ($s, $min, $h, $d, $m,$y) = localtime(time);
$y+=1900;
$m+=1;
$m = $m < 10 ? $m = "0".$m : $m;
$cgiparams{'MONTH'} = $m;
&Header::getcgihash(\%cgiparams);
$cgiparams{'YEAR'} = $y;
&Header::getcgihash(\%cgiparams);
&Header::showhttpheaders();
my %selectYear;
$selectYear{'YEAR'}{'2001'} = '';
$selectYear{'YEAR'}{'2002'} = '';
$selectYear{'YEAR'}{'2003'} = '';
$selectYear{'YEAR'}{'2004'} = '';
$selectYear{'YEAR'}{'2005'} = '';
$selectYear{'YEAR'}{'2006'} = '';
$selectYear{'YEAR'}{'2007'} = '';
$selectYear{'YEAR'}{'2008'} = '';
$selectYear{'YEAR'}{'2009'} = '';
$selectYear{'YEAR'}{'????'} = '';
$selectYear{'YEAR'}{$cgiparams{'YEAR'}} = 'selected=\'selected\'';
my %selected;
$selected{'MONTH'}{'01'} = '';
$selected{'MONTH'}{'02'} = '';
$selected{'MONTH'}{'03'} = '';
$selected{'MONTH'}{'04'} = '';
$selected{'MONTH'}{'05'} = '';
$selected{'MONTH'}{'06'} = '';
$selected{'MONTH'}{'07'} = '';
$selected{'MONTH'}{'08'} = '';
$selected{'MONTH'}{'09'} = '';
$selected{'MONTH'}{'10'} = '';
$selected{'MONTH'}{'11'} = '';
$selected{'MONTH'}{'12'} = '';
$selected{'MONTH'}{'??'} = '';
$selected{'MONTH'}{$cgiparams{'MONTH'}} = 'selected=\'selected\'';
&Header::openpage($Lang::tr{'sstraffic'}, 1, '');
&Header::openbigbox('100%', 'left');
&Header::openbox('100%', 'left', $Lang::tr{'settingsc'});
print <<END;
<table width='80%' align='center'>
<tr>
<td width='95%' align='left' nowrap='nowrap'>
<form method='post' action='/cgi-bin/traffic.cgi'>
$Lang::tr{'selecttraffic'}
<select name='MONTH'>
<option $selected{'MONTH'}{'01'} value='01'>$Lang::tr{'january'}</option>
<option $selected{'MONTH'}{'02'} value='02'>$Lang::tr{'february'}</option>
<option $selected{'MONTH'}{'03'} value='03'>$Lang::tr{'march'}</option>
<option $selected{'MONTH'}{'04'} value='04'>$Lang::tr{'april'}</option>
<option $selected{'MONTH'}{'05'} value='05'>$Lang::tr{'may'}</option>
<option $selected{'MONTH'}{'06'} value='06'>$Lang::tr{'june'}</option>
<option $selected{'MONTH'}{'07'} value='07'>$Lang::tr{'july'}</option>
<option $selected{'MONTH'}{'08'} value='08'>$Lang::tr{'august'}</option>
<option $selected{'MONTH'}{'09'} value='09'>$Lang::tr{'september'}</option>
<option $selected{'MONTH'}{'10'} value='10'>$Lang::tr{'october'}</option>
<option $selected{'MONTH'}{'11'} value='11'>$Lang::tr{'november'}</option>
<option $selected{'MONTH'}{'12'} value='12'>$Lang::tr{'december'}</option>
<option $selected{'MONTH'}{'??'} value='??'>$Lang::tr{'allmsg'}</option>
</select>
<select name='YEAR'>
<option $selectYear{'YEAR'}{'2001'} value='2001'>2001</option>
<option $selectYear{'YEAR'}{'2002'} value='2002'>2002</option>
<option $selectYear{'YEAR'}{'2003'} value='2003'>2003</option>
<option $selectYear{'YEAR'}{'2004'} value='2004'>2004</option>
<option $selectYear{'YEAR'}{'2005'} value='2005'>2005</option>
<option $selectYear{'YEAR'}{'2006'} value='2006'>2006</option>
<option $selectYear{'YEAR'}{'????'} value='????'>$Lang::tr{'allmsg'}</option>
</select>
<input type='submit' name='ACTION' value='$Lang::tr{'update'}' />
</form>
</td>
<td width='5%' align='center'>
<form method='post' action='/cgi-bin/traffics.cgi'>
<input type='submit' name='ACTION' value=' > ' />
</form>
</td>
</tr>
</table>
END
&Header::closebox();
&Header::openbox('100%', 'left', $Lang::tr{'traffics'});
my $dateWidth = '20%';
my $netWidth = '34%';
my $inOutWidth = '17%';
# 4 networks
if ($netsettings{'CONFIG_TYPE'} =~ /^(5|7)$/) {
$dateWidth = '12%';
$netWidth = '22%';
$inOutWidth = '11%';
}
# 3 networks
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|4|6)$/) {
$dateWidth = '16%';
$netWidth = '28%';
$inOutWidth = '14%';
}
print <<END;
<table width='100%'>
<tr>
<td width='$dateWidth' align='center' class='boldbase'></td>
<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficgreen'}</b></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/) {
print "<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficblue'}</b></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/) {
print "<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficorange'}</b></td>";
}
print <<END;
<td width='$netWidth' align='center' class='boldbase'><b>$Lang::tr{'trafficred'}</b></td>
</tr>
</table>
<table width='100%'>
<tr>
<td width='$dateWidth' align='center' class='boldbase'><b>$Lang::tr{'trafficdate'}</b></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#16A61D'><b>$Lang::tr{'trafficin'}</b></font></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#16A61D'><b>$Lang::tr{'trafficout'}</b></font></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='${Header::colourblue}'><b>$Lang::tr{'trafficin'}</b></font></td>";
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='${Header::colourblue}'><b>$Lang::tr{'trafficout'}</b></font></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='#FF9933'><b>$Lang::tr{'trafficin'}</b></font></td>";
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='#FF9933'><b>$Lang::tr{'trafficout'}</b></font></td>";
}
print <<END;
<td width='$inOutWidth' align='center' class='boldbase'><font color='#CE1B31'><b>$Lang::tr{'trafficin'}</b></font></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#CE1B31'><b>$Lang::tr{'trafficout'}</b></font></td>
</tr>
END
my $total_blue_in=0;
my $total_blue_out=0;
my $total_green_in=0;
my $total_green_out=0;
my $total_orange_in=0;
my $total_orange_out=0;
my $total_red_in=0;
my $total_red_out=0;
my $lines=0;
my $displayMode = "daily";
my $startMonth = $cgiparams{'MONTH'};
my $endMonth = $cgiparams{'MONTH'};
if ($cgiparams{'MONTH'} eq '??') {
$displayMode = "monthly";
$startMonth = '01';
$endMonth = '12';
}
my $start = "$cgiparams{'YEAR'}$startMonth"."01";
my $end = "$cgiparams{'YEAR'}$endMonth"."32";
my %allDaysBytes = ();
my @allDays = &Traffic::calcTraffic(\%allDaysBytes,$start,$end, $displayMode);
foreach (@allDays) {
$total_green_in += $allDaysBytes{$_}{${Traffic::green_in}};
$total_green_out += $allDaysBytes{$_}{${Traffic::green_out}};
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
$total_blue_in += $allDaysBytes{$_}{${Traffic::blue_in}};
$total_blue_out += $allDaysBytes{$_}{${Traffic::blue_out}};
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
$total_orange_in += $allDaysBytes{$_}{${Traffic::orange_in}};
$total_orange_out += $allDaysBytes{$_}{${Traffic::orange_out}};
}
$total_red_in += $allDaysBytes{$_}{${Traffic::red_in}};
$total_red_out += $allDaysBytes{$_}{${Traffic::red_out}};
if ($lines % 2) {
print "<tr bgcolor='${Header::table1colour}'>"; }
else {
print "<tr bgcolor='${Header::table2colour}'>"; }
printf "<td align='center' nowrap='nowrap'>%s</td>\n", $allDaysBytes{$_}{'Day'};
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::green_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::green_out}}/1048576);
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::blue_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::blue_out}}/1048576);
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::orange_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::orange_out}}/1048576);
}
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::red_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td></tr>\n", ($allDaysBytes{$_}{${Traffic::red_out}}/1048576);
$lines++;
}
$total_green_in=sprintf("%.2f", ($total_green_in/1048576));
$total_green_out=sprintf("%.2f", ($total_green_out/1048576));
$total_blue_in=sprintf("%.2f", ($total_blue_in/1048576));
$total_blue_out=sprintf("%.2f", ($total_blue_out/1048576));
$total_orange_in=sprintf("%.2f", ($total_orange_in/1048576));
$total_orange_out=sprintf("%.2f", ($total_orange_out/1048576));
$total_red_in=sprintf("%.2f", ($total_red_in/1048576));
$total_red_out=sprintf("%.2f", ($total_red_out/1048576));
if ($lines % 2) {print "<tr bgcolor='${Header::table1colour}'>"; }
else {print "<tr bgcolor='${Header::table2colour}'>"; }
print <<END;
<td align='center' class='boldbase' height='20' nowrap='nowrap'><b>$Lang::tr{'trafficsum'}</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_green_in MB</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_green_out MB</b></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_blue_in MB</b></td>";
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_blue_out MB</b></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_orange_in MB</b></td>";
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_orange_out MB</b></td>";
}
print <<END;
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_red_in MB</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_red_out MB</b></td>
</tr>
</table>
END
&Header::closebox();
&Header::closebigbox();
&Header::closepage();

357
html/cgi-bin/traffics.cgi Normal file
View File

@@ -0,0 +1,357 @@
#!/usr/bin/perl
#
# SmoothWall CGIs
#
# This code is distributed under the terms of the GPL
#
# (c) The SmoothWall Team
#
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require '/var/ipfire/net-traffic/net-traffic-lib.pl';
my %cgiparams;
my %netsettings;
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
my @years=("2001","2002","2003","2004","2005","2006","2007","2008","2009");
my @longmonths = ( $Lang::tr{'january'}, $Lang::tr{'february'}, $Lang::tr{'march'},
$Lang::tr{'april'}, $Lang::tr{'may'}, $Lang::tr{'june'}, $Lang::tr{'july'}, $Lang::tr{'august'},
$Lang::tr{'september'}, $Lang::tr{'october'}, $Lang::tr{'november'},
$Lang::tr{'december'} );
my @months = ( 0,1,2,3,4,5,6,7,8,9,10,11 );
my @days = ( 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 );
my @wday = ($Lang::tr{'wday1'}, $Lang::tr{'wday2'}, $Lang::tr{'wday3'}, $Lang::tr{'wday4'}, $Lang::tr{'wday5'}, $Lang::tr{'wday6'}, $Lang::tr{'wday7'});
my @now = localtime(time);
$now[5] = $now[5]+1900;
$cgiparams{'STARTDAY'} = 10;
$cgiparams{'STOPDAY'} = 11;
$cgiparams{'STARTYEAR'} = $now[5];
$cgiparams{'STOPYEAR'} = $now[5];
# this periode started last month
if ($now[3] < 10) {
$cgiparams{'STARTMONTH'} = $now[4]-1;
$cgiparams{'STOPMONTH'} = $now[4];
# when current month is january we start in last year december
if ($now[4] == 0) {
$cgiparams{'STARTYEAR'} = $now[5]-1;
$cgiparams{'STARTMONTH'} = 11;
}
}
else {
$cgiparams{'STARTMONTH'} = $now[4];
$cgiparams{'STOPMONTH'} = $now[4]+1;
# when we are december, this periode ends next year january
if ($now[4] == 11) {
$cgiparams{'STOPYEAR'} = $now[5]+1;
$cgiparams{'STOPMONTH'} = 0;
}
}
&Header::getcgihash(\%cgiparams);
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'sstraffic'}, 1, '');
&Header::openbigbox('100%', 'left');
&Header::openbox('100%', 'left', $Lang::tr{'settingsc'});
print <<END;
<table width='100%' align='center'>
<tr>
<td width='95%' class='base' align='center'>
<form method='post' action='/cgi-bin/traffics.cgi'>
$Lang::tr{'trafficfrom'}
<select name='STARTDAY'>
END
foreach (@days)
{
print "\t<option ";
if ($_ == $cgiparams{'STARTDAY'}) {
print 'selected=\'selected\' '; }
print "value='$_'>$_</option>\n";
}
print <<END;
</select>
<select name='STARTMONTH'>
END
foreach (@months)
{
print "\t<option ";
if ($_ == $cgiparams{'STARTMONTH'}) {
print 'selected=\'selected\' '; }
print "value='$_'>$longmonths[$_]</option>\n";
}
print <<END;
</select>
<select name='STARTYEAR'>
END
for (my $index=0; $index<=$#years; $index++) {
print "\t<option ";
if ($years[$index] == $cgiparams{'STARTYEAR'}) {
print 'selected=\'selected\' '; }
print "value='$years[$index]'>$years[$index]</option>\n";
}
print <<END;
</select>
$Lang::tr{'trafficto'}
<select name='STOPDAY'>
END
foreach (@days)
{
print "\t<option ";
if ($_ == $cgiparams{'STOPDAY'})
{
print 'selected=\'selected\' '; }
print "value='$_'>$_</option>\n";
}
print <<END;
</select>
<select name='STOPMONTH'>
END
foreach (@months)
{
print "\t<option ";
if ($_ == $cgiparams{'STOPMONTH'}) {
print 'selected=\'selected\' '; }
print "value='$_'>$longmonths[$_]</option>\n";
}
print <<END;
</select>
<select name='STOPYEAR'>
END
for (my $index = 0; $index <=$#years; $index++) {
print "\t<option ";
if ($years[$index] == $cgiparams{'STOPYEAR'}) {
print 'selected=\'selected\' '; }
print "value='$years[$index]'>$years[$index]</option>\n";
}
print <<END;
</select>
<input type='submit' name='ACTION' value='$Lang::tr{'update'}' />
</form>
</td>
<td width='5%' align='center'>
<form method='post' action='/cgi-bin/traffic.cgi'>
<input type='submit' name='ACTION' value=' > ' />
</form>
</td>
</tr>
</table>
END
&Header::closebox();
&Header::openbox('100%', 'left', $Lang::tr{'traffics'});
my $dateWidth = '20%';
my $netWidth = '34%';
my $inOutWidth = '17%';
# 4 networks
if ($netsettings{'CONFIG_TYPE'} =~ /^(5|7)$/) {
$dateWidth = '12%';
$netWidth = '22%';
$inOutWidth = '11%';
}
# 3 networks
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|4|6)$/) {
$dateWidth = '16%';
$netWidth = '28%';
$inOutWidth = '14%';
}
print <<END;
<table width='100%'>
<tr>
<td width='$dateWidth' align='center' class='boldbase'></td>
<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficgreen'}</b></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/) {
print "<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficblue'}</b></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/) {
print "<td width='$netWidth' align='center' class='boldbase' ><b>$Lang::tr{'trafficorange'}</b></td>";
}
print <<END;
<td width='$netWidth' align='center' class='boldbase'><b>$Lang::tr{'trafficred'}</b></td>
</tr>
</table>
<table width='100%'>
<tr>
<td width='$dateWidth' align='center' class='boldbase'><b>$Lang::tr{'trafficdate'}</b></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#16A61D'><b>$Lang::tr{'trafficin'}</b></font></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#16A61D'><b>$Lang::tr{'trafficout'}</b></font></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='${Header::colourblue}'><b>$Lang::tr{'trafficin'}</b></font></td>";
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='${Header::colourblue}'><b>$Lang::tr{'trafficout'}</b></font></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='#FF9933'><b>$Lang::tr{'trafficin'}</b></font></td>";
print "<td width='$inOutWidth' align='center' class='boldbase'><font color='#FF9933'><b>$Lang::tr{'trafficout'}</b></font></td>";
}
print <<END;
<td width='$inOutWidth' align='center' class='boldbase'><font color='#CE1B31'><b>$Lang::tr{'trafficin'}</b></font></td>
<td width='$inOutWidth' align='center' class='boldbase'><font color='#CE1B31'><b>$Lang::tr{'trafficout'}</b></font></td>
</tr>
END
my $total_blue_in=0;
my $total_blue_out=0;
my $total_green_in=0;
my $total_green_out=0;
my $total_orange_in=0;
my $total_orange_out=0;
my $total_red_in=0;
my $total_red_out=0;
my $lines=0;
my $startyear = $cgiparams{'STARTYEAR'};
my $stopyear = $cgiparams{'STOPYEAR'};
my $startMonth = $cgiparams{'STARTMONTH'}+1;
$startMonth = $startMonth < 10 ? $startMonth = "0".$startMonth : $startMonth;
my $endMonth = $cgiparams{'STOPMONTH'}+1;
$endMonth = $endMonth < 10 ? $endMonth = "0".$endMonth : $endMonth;
my $startDay = $cgiparams{'STARTDAY'};
$startDay = $startDay < 10 ? $startDay = "0".$startDay : $startDay;
my $endDay = $cgiparams{'STOPDAY'}+1;
$endDay = $endDay < 10 ? $endDay = "0".$endDay : $endDay;
my $displayMode = "daily_multi";
my $start = $startyear.$startMonth.$startDay;
my $end = $stopyear.$endMonth.$endDay;
my %allDaysBytes = ();
my @allDays = &Traffic::calcTraffic(\%allDaysBytes,$start,$end, $displayMode);
foreach (@allDays) {
$total_green_in += $allDaysBytes{$_}{${Traffic::green_in}};
$total_green_out += $allDaysBytes{$_}{${Traffic::green_out}};
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
$total_blue_in += $allDaysBytes{$_}{${Traffic::blue_in}};
$total_blue_out += $allDaysBytes{$_}{${Traffic::blue_out}};
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
$total_orange_in += $allDaysBytes{$_}{${Traffic::orange_in}};
$total_orange_out += $allDaysBytes{$_}{${Traffic::orange_out}};
}
$total_red_in += $allDaysBytes{$_}{${Traffic::red_in}};
$total_red_out += $allDaysBytes{$_}{${Traffic::red_out}};
if ($lines % 2) {
print "<tr bgcolor='${Header::table1colour}'>"; }
else {
print "<tr bgcolor='${Header::table2colour}'>"; }
printf "<td align='center' nowrap='nowrap'>%s</td>\n", $allDaysBytes{$_}{'Day'};
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::green_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::green_out}}/1048576);
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::blue_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::blue_out}}/1048576);
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::orange_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::orange_out}}/1048576);
}
printf "<td align='center' nowrap='nowrap'>%.3f</td>\n", ($allDaysBytes{$_}{${Traffic::red_in}}/1048576);
printf "<td align='center' nowrap='nowrap'>%.3f</td></tr>\n", ($allDaysBytes{$_}{${Traffic::red_out}}/1048576);
$lines++;
}
$total_green_in=sprintf("%.2f", ($total_green_in/1048576));
$total_green_out=sprintf("%.2f", ($total_green_out/1048576));
$total_blue_in=sprintf("%.2f", ($total_blue_in/1048576));
$total_blue_out=sprintf("%.2f", ($total_blue_out/1048576));
$total_orange_in=sprintf("%.2f", ($total_orange_in/1048576));
$total_orange_out=sprintf("%.2f", ($total_orange_out/1048576));
$total_red_in=sprintf("%.2f", ($total_red_in/1048576));
$total_red_out=sprintf("%.2f", ($total_red_out/1048576));
if ($lines % 2) {print "<tr bgcolor='${Header::table1colour}'>"; }
else {print "<tr bgcolor='${Header::table2colour}'>"; }
print <<END;
<td align='center' class='boldbase' height='20' nowrap='nowrap'><b>$Lang::tr{'trafficsum'}</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_green_in MB</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_green_out MB</b></td>
END
if ($netsettings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/)
{
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_blue_in MB</b></td>";
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_blue_out MB</b></td>";
}
if ($netsettings{'CONFIG_TYPE'} =~ /^(1|3|5|7)$/)
{
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_orange_in MB</b></td>";
print "<td align='center' class='boldbase' nowrap='nowrap'><b>$total_orange_out MB</b></td>";
}
print <<END;
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_red_in MB</b></td>
<td align='center' class='boldbase' nowrap='nowrap'><b>$total_red_out MB</b></td>
</tr>
</table>
END
&Header::closebox();
&Header::closebigbox();
&Header::closepage();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -950,6 +950,22 @@
'you can only define one roadwarrior connection when using pre-shared key authentication' => 'Sie können nur eine Roadwarrior Verbindung definieren, wenn die Pre-shared Schlüsselauthentifizierung verwendet wird.<br/>Entweder haben Sie bereits eine Roadwarrior Verbindung mit Pre-shared Schlüsselauthentifizierung, oder Sie versuchen gerade eine hinzuzufügen.',
'your department' => 'Ihre Abteilung',
'your e-mail' => 'Ihre E-mail Adresse',
'dial profile' => 'Verbinden mit Profil',
'quick control' => 'Quick Control',
'allmsg' => 'zeige alles',
'selecttraffic' => 'Wähle den Nutzungs Zeitraum:',
'sstraffic' => 'Net-Traffic',
'trafficblue' => 'WLAN',
'trafficdate' => 'Datum',
'trafficfrom' => 'Von',
'trafficgreen' => 'Internes Netz',
'trafficin' => 'Input',
'trafficorange' => 'DMZ',
'trafficout' => 'Output',
'trafficred' => 'Internet',
'traffics' => 'Nutzungs-überblick:',
'trafficsum' => 'Gesamt',
'trafficto' => 'Bis',
);

File diff suppressed because it is too large Load Diff

View File

@@ -81,7 +81,7 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
dist:
make-packages.sh asterisk $(THISAPP)
make-packages.sh asterisk $(THISAPP)-ipfire-beta-1
###############################################################################
# Downloading, checking, md5sum

View File

@@ -85,6 +85,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP)/capiinit && ./configure
cd $(DIR_APP)/capiinit && make
cd $(DIR_APP)/capiinit && make install
cd $(DIR_APP)/capiinfo && ./configure
cd $(DIR_APP)/capiinfo && make
cd $(DIR_APP)/capiinfo && make install
cd $(DIR_APP)/capi20 && SED=sed ./configure
cd $(DIR_APP)/capi20 && SED=sed make
cd $(DIR_APP)/capi20 && make install

View File

@@ -57,7 +57,7 @@ $(TARGET) :
# Create all directories
for i in addon-lang alcatelusb auth backup backup/sets ca certs cnx_pci crls ddns dhcp dhcpc dmzholes \
eagle-usb eciadsl ethernet isdn key langs logging main modem optionsfw patches pakfire portfw \
eagle-usb eciadsl ethernet isdn key langs logging main modem net-traffic optionsfw patches pakfire portfw \
ppp private proxy red remote shaping snort time uplinks vpn wireless xtaccess ; do \
mkdir -p $(CONFIG_ROOT)/$$i; \
done
@@ -85,6 +85,7 @@ $(TARGET) :
cp $(DIR_SRC)/config/cfgroot/advoptions-list $(CONFIG_ROOT)/dhcp/advoptions-list
cp $(DIR_SRC)/config/cfgroot/modem-defaults $(CONFIG_ROOT)/modem/defaults
cp $(DIR_SRC)/config/cfgroot/modem-settings $(CONFIG_ROOT)/modem/settings
cp $(DIR_SRC)/config/cfgroot/net-traffic-lib.pl $(CONFIG_ROOT)/net-traffic/net-traffic-lib.pl
cp $(DIR_SRC)/config/cfgroot/proxy-acl $(CONFIG_ROOT)/proxy/acl-1.4
cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config
cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings

View File

@@ -53,5 +53,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && cp -fRv src/pakfire $(DIR_APP)
cd $(DIR_APP) && mv -vf pakfire.conf /etc
cd $(DIR_APP) && chown root.root $(DIR_APP) -R && chmod 755 pakfire lib/*
cd $(DIR_APP) && find $(DIR_APP) -name .svn -exec rm -rf {} \;
# cd $(DIR_APP) && find $(DIR_APP) -name .svn -exec rm -rf {} \;
@$(POSTBUILD)

View File

@@ -21022,6 +21022,9 @@ home/httpd/cgi-bin/upload.cgi
home/httpd/cgi-bin/vpnmain.cgi
home/httpd/cgi-bin/wireless.cgi
home/httpd/cgi-bin/xtaccess.cgi
home/httpd/cgi-bin/traffic.cgi
home/httpd/cgi-bin/traffics.cgi
home/httpd/cgi-bin/pakfire.cgi
#home/httpd/htdocs
#home/httpd/htdocs/apache_pb.gif
#home/httpd/htdocs/index.html.ca
@@ -21742,6 +21745,8 @@ usr/lib/libcapi20.so
#usr/lib/libcapi20.la
#usr/lib/libcapi20.a
usr/sbin/capiinit
usr/bin/capiinfo
#usr/share/man/man8/capiinfo.8
#usr/share/man/man8/avmcapictrl.8
#usr/share/man/man8/capiplugin.8
#sbin/avmcapictrl