mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Webinterface gefixt.
Ohne Anmeldung kommt man im Webinterface nichtmehr auf die Index-Seite. Berkeley-DB neu implementiert. Postfix geht jetzt. Graphs gefixt. IPCop-Updates gelöscht. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@82 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
File diff suppressed because it is too large
Load Diff
3
config/etc/aliases
Normal file
3
config/etc/aliases
Normal file
@@ -0,0 +1,3 @@
|
||||
# /etc/aliases
|
||||
postmaster: root
|
||||
|
||||
@@ -18,3 +18,6 @@ local7.* /var/log/boot.log
|
||||
|
||||
# Optionally log to a remote host
|
||||
#*.* @hostname.domain
|
||||
|
||||
# Postfix logs
|
||||
mail.* /var/log/mail
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
##
|
||||
## httpd.conf -- Apache HTTP server configuration file
|
||||
##
|
||||
## $Id: httpd.conf,v 1.15.2.7 2005/04/16 11:40:15 rkerr Exp $
|
||||
##
|
||||
ServerType standalone
|
||||
ServerRoot /etc/httpd
|
||||
|
||||
LockFile /var/lock/httpd.lock
|
||||
PidFile /var/run/httpd.pid
|
||||
ScoreBoardFile /var/run/httpd.scoreboard
|
||||
Timeout 900
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 2
|
||||
StartServers 2
|
||||
MaxClients 10
|
||||
MaxRequestsPerChild 100
|
||||
Port 81
|
||||
Listen 81
|
||||
Listen 444
|
||||
User nobody
|
||||
Group nobody
|
||||
ServerAdmin root@localhost
|
||||
ServerTokens Prod
|
||||
DocumentRoot /home/httpd/html
|
||||
# Limit track/trace requests
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
|
||||
RewriteRule .* - [F]
|
||||
|
||||
<Directory />
|
||||
Options None
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
<Directory /home/httpd/html>
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
<DirectoryMatch "/home/httpd/html/(graphs|sgraph)">
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile CONFIG_ROOT/auth/users
|
||||
require user admin
|
||||
</DirectoryMatch>
|
||||
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
|
||||
<Directory /home/httpd/cgi-bin>
|
||||
AllowOverride None
|
||||
Options None
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile CONFIG_ROOT/auth/users
|
||||
Require user admin
|
||||
<Files index.cgi>
|
||||
Satisfy Any
|
||||
Allow from All
|
||||
</Files>
|
||||
<Files credits.cgi>
|
||||
Satisfy Any
|
||||
Allow from All
|
||||
</Files>
|
||||
<Files dial.cgi>
|
||||
Require user admin dial
|
||||
</Files>
|
||||
</Directory>
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.htm index.shtml index.cgi
|
||||
</IfModule>
|
||||
AccessFileName .htaccess
|
||||
<Files ~ "^\.ht">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
<IfModule mod_mime.c>
|
||||
TypesConfig /etc/mime.types
|
||||
</IfModule>
|
||||
DefaultType text/plain
|
||||
|
||||
HostnameLookups Off
|
||||
ErrorLog /var/log/httpd/error_log
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
CustomLog /var/log/httpd/access_log common
|
||||
ServerSignature Off
|
||||
AddHandler cgi-script .cgi
|
||||
<IfModule mod_setenvif.c>
|
||||
BrowserMatch "Mozilla/2" nokeepalive
|
||||
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
|
||||
BrowserMatch "RealPlayer 4\.0" force-response-1.0
|
||||
BrowserMatch "Java/1\.0" force-response-1.0
|
||||
BrowserMatch "JDK/1\.0" force-response-1.0
|
||||
</IfModule>
|
||||
|
||||
###
|
||||
### SSL Configuration
|
||||
###
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
SSLPassPhraseDialog builtin
|
||||
SSLSessionCache dbm:/var/log/httpd/ssl_scache
|
||||
SSLSessionCacheTimeout 900
|
||||
SSLMutex file:/var/log/httpd/ssl_mutex
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
SSLLog /var/log/httpd/ssl_engine_log
|
||||
SSLLogLevel info
|
||||
|
||||
<VirtualHost _default_:444>
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
|
||||
RewriteRule .* - [F]
|
||||
DocumentRoot /home/httpd/html
|
||||
ServerAdmin root@localhost
|
||||
ErrorLog /var/log/httpd/error_log
|
||||
TransferLog /var/log/httpd/access_log
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP
|
||||
SSLCertificateFile /etc/httpd/server.crt
|
||||
SSLCertificateKeyFile /etc/httpd/server.key
|
||||
<Files ~ "\.(cgi|shtml?)$">
|
||||
SSLOptions +StdEnvVars
|
||||
</Files>
|
||||
<Directory /home/httpd/cgi-bin>
|
||||
SSLOptions +StdEnvVars
|
||||
</Directory>
|
||||
SetEnv HOME /home/nobody
|
||||
SetEnvIf User-Agent ".*MSIE.*" \
|
||||
nokeepalive ssl-unclean-shutdown \
|
||||
downgrade-1.0 force-response-1.0
|
||||
CustomLog /var/log/httpd/ssl_request_log \
|
||||
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /home/httpd/html/backup>
|
||||
Options None
|
||||
AllowOverride None
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile /var/ipcop/auth/users
|
||||
require user admin
|
||||
</Directory>
|
||||
|
||||
include /etc/httpd/conf/hostname.conf
|
||||
##
|
||||
## httpd.conf -- Apache HTTP server configuration file
|
||||
##
|
||||
## $Id: httpd.conf,v 1.15.2.7 2005/04/16 11:40:15 rkerr Exp $
|
||||
##
|
||||
ServerType standalone
|
||||
ServerRoot /etc/httpd
|
||||
|
||||
LockFile /var/lock/httpd.lock
|
||||
PidFile /var/run/httpd.pid
|
||||
ScoreBoardFile /var/run/httpd.scoreboard
|
||||
Timeout 900
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 2
|
||||
StartServers 2
|
||||
MaxClients 10
|
||||
MaxRequestsPerChild 100
|
||||
Port 81
|
||||
Listen 81
|
||||
Listen 444
|
||||
User nobody
|
||||
Group nobody
|
||||
ServerAdmin root@localhost
|
||||
ServerTokens Prod
|
||||
DocumentRoot /home/httpd/html
|
||||
# Limit track/trace requests
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
|
||||
RewriteRule .* - [F]
|
||||
|
||||
<Directory />
|
||||
Options None
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
<Directory /home/httpd/html>
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
<DirectoryMatch "/home/httpd/html/(graphs|sgraph)">
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile CONFIG_ROOT/auth/users
|
||||
require user admin
|
||||
</DirectoryMatch>
|
||||
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
|
||||
<Directory /home/httpd/cgi-bin>
|
||||
AllowOverride None
|
||||
Options None
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile /var/ipfire/auth/users
|
||||
Require user admin
|
||||
# <Files index.cgi>
|
||||
# Satisfy Any
|
||||
# Allow from All
|
||||
# </Files>
|
||||
<Files credits.cgi>
|
||||
Satisfy Any
|
||||
Allow from All
|
||||
</Files>
|
||||
<Files dial.cgi>
|
||||
Require user admin dial
|
||||
</Files>
|
||||
</Directory>
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.htm index.shtml index.cgi
|
||||
</IfModule>
|
||||
AccessFileName .htaccess
|
||||
<Files ~ "^\.ht">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
<IfModule mod_mime.c>
|
||||
TypesConfig /etc/mime.types
|
||||
</IfModule>
|
||||
DefaultType text/plain
|
||||
|
||||
HostnameLookups Off
|
||||
ErrorLog /var/log/httpd/error_log
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
CustomLog /var/log/httpd/access_log common
|
||||
ServerSignature Off
|
||||
AddHandler cgi-script .cgi
|
||||
<IfModule mod_setenvif.c>
|
||||
BrowserMatch "Mozilla/2" nokeepalive
|
||||
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
|
||||
BrowserMatch "RealPlayer 4\.0" force-response-1.0
|
||||
BrowserMatch "Java/1\.0" force-response-1.0
|
||||
BrowserMatch "JDK/1\.0" force-response-1.0
|
||||
</IfModule>
|
||||
|
||||
###
|
||||
### SSL Configuration
|
||||
###
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
SSLPassPhraseDialog builtin
|
||||
SSLSessionCache dbm:/var/log/httpd/ssl_scache
|
||||
SSLSessionCacheTimeout 900
|
||||
SSLMutex file:/var/log/httpd/ssl_mutex
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
SSLLog /var/log/httpd/ssl_engine_log
|
||||
SSLLogLevel info
|
||||
|
||||
<VirtualHost _default_:444>
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
|
||||
RewriteRule .* - [F]
|
||||
DocumentRoot /home/httpd/html
|
||||
ServerAdmin root@localhost
|
||||
ErrorLog /var/log/httpd/error_log
|
||||
TransferLog /var/log/httpd/access_log
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP
|
||||
SSLCertificateFile /etc/httpd/server.crt
|
||||
SSLCertificateKeyFile /etc/httpd/server.key
|
||||
<Files ~ "\.(cgi|shtml?)$">
|
||||
SSLOptions +StdEnvVars
|
||||
</Files>
|
||||
<Directory /home/httpd/cgi-bin>
|
||||
SSLOptions +StdEnvVars
|
||||
</Directory>
|
||||
SetEnv HOME /home/nobody
|
||||
SetEnvIf User-Agent ".*MSIE.*" \
|
||||
nokeepalive ssl-unclean-shutdown \
|
||||
downgrade-1.0 force-response-1.0
|
||||
CustomLog /var/log/httpd/ssl_request_log \
|
||||
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /home/httpd/html/backup>
|
||||
Options None
|
||||
AllowOverride None
|
||||
AuthName "Restricted"
|
||||
AuthType Basic
|
||||
AuthUserFile /var/ipfire/auth/users
|
||||
require user admin
|
||||
</Directory>
|
||||
|
||||
include /etc/httpd/conf/hostname.conf
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
* libpcap-0.8.3
|
||||
* libpng-1.2.8
|
||||
* libsafe-2.0-16
|
||||
* libsafe_2.0-16
|
||||
* libtool-1.5.6
|
||||
* libusb-0.1.7
|
||||
* libwww-perl-5.803
|
||||
|
||||
@@ -28,7 +28,7 @@ require "${General::swroot}/header.pl";
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'credits'});
|
||||
|
||||
print <<END
|
||||
<br /><center><b>Visit us on <a href='http://www.ipcop.org/'>http://www.ipcop.org/</a></b></center>
|
||||
<br /><center><b>Besuchen sie uns auf <a href='http://www.ipfire.org/'>http://www.ipfire.org/</a></b></center>
|
||||
|
||||
<p><b>Main Credits</b><br />
|
||||
Project Member - Mark Wormgoor
|
||||
|
||||
103
html/cgi-bin/pakfire.cgi
Normal file
103
html/cgi-bin/pakfire.cgi
Normal file
@@ -0,0 +1,103 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# IPCop CGIs
|
||||
#
|
||||
# This file is part of the IPCop Project
|
||||
#
|
||||
# This code is distributed under the terms of the GPL
|
||||
#
|
||||
# (c) Eric Oberlander June 2002
|
||||
#
|
||||
# (c) Darren Critchley June 2003 - added real time clock setting, etc
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require 'CONFIG_ROOT/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
my %pakfiresettings=();
|
||||
my $errormessage = '';
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
$pakfiresettings{'ACTION'} = '';
|
||||
$pakfiresettings{'VALID'} = '';
|
||||
|
||||
$pakfiresettings{'INSTALLED'} = '';
|
||||
$pakfiresettings{'AVAIL'} = '';
|
||||
$pakfiresettings{'AUTOUPD'} = '';
|
||||
|
||||
&Header::getcgihash(\%pakfiresettings);
|
||||
|
||||
if ($pakfiresettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
&General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings);
|
||||
|
||||
|
||||
my %selected=();
|
||||
my %checked=();
|
||||
|
||||
$checked{'AUTOUPD'}{'off'} = '';
|
||||
$checked{'AUTOUPD'}{'on'} = '';
|
||||
$checked{'AUTOUPD'}{$pakfiresettings{'AUTOUPD'}} = "checked='checked'";
|
||||
|
||||
&Header::openpage($Lang::tr{'pakfire configuration'}, 1, $refresh);
|
||||
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
|
||||
# DPC move error message to top so it is seen!
|
||||
if ($errormessage) {
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
|
||||
print "<font class='base'>$errormessage </font>\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
|
||||
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'network pakfire'});
|
||||
print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td><input type='checkbox' name='ENABLENTP' $checked{'ENABLENTP'}{'on'} /></td>
|
||||
<td width='100%' colspan='4' class='base'>$Lang::tr{'network pakfire from'}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td width='100%' class='base' colspan='4'>
|
||||
END
|
||||
;
|
||||
|
||||
|
||||
print <<END
|
||||
</table>
|
||||
<br />
|
||||
<hr />
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td width='30%'><img src='/blob.gif' alt='*' /> $Lang::tr{'this field may be blank'}</td>
|
||||
<td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
|
||||
<td width='33%' align='right'>
|
||||
<a href='${General::adminmanualurl}/services.html#services_pakfire' target='_blank'><img src='/images/web-support.png' title='$Lang::tr{'online help en'}' /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
END
|
||||
;
|
||||
|
||||
&Header::closebox();
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
&Header::closebigbox();
|
||||
|
||||
&Header::closepage();
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# SmoothWall CGIs
|
||||
#
|
||||
# This code is distributed under the terms of the GPL
|
||||
#
|
||||
# (c) The SmoothWall Team
|
||||
#
|
||||
# $Id: updates.cgi,v 1.9.2.22 2005/12/01 20:41:53 franck78 Exp $
|
||||
#
|
||||
|
||||
use LWP::UserAgent;
|
||||
use File::Copy;
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require 'CONFIG_ROOT/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
#workaround to suppress a warning when a variable is used only once
|
||||
my @dummy = ( $General::version );
|
||||
undef (@dummy);
|
||||
my $warnmessage='';
|
||||
my $errormessage='';
|
||||
my @av=('');
|
||||
my @pf=('');
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
my %uploadsettings=();
|
||||
$uploadsettings{'ACTION'} = '';
|
||||
|
||||
&Header::getcgihash(\%uploadsettings, {'wantfile' => 1, 'filevar' => 'FH'});
|
||||
|
||||
if ($uploadsettings{'ACTION'} eq $Lang::tr{'upload'}) {
|
||||
# This code do not serve a lot because $General::version cannot change while the module is loaded. So no change
|
||||
# can appear. More, this call should be called 'after' update is done !
|
||||
# my $return = &downloadlist();
|
||||
# if ($return && $return->is_success) {
|
||||
# if (open(LIST, ">${General::swroot}/patches/available")){
|
||||
# flock LIST, 2;
|
||||
# my @this = split(/----START LIST----\n/,$return->content);
|
||||
# print LIST $this[1];
|
||||
# close(LIST);
|
||||
# } else {
|
||||
# $errormessage = $Lang::tr{'could not open available updates file'};
|
||||
# }
|
||||
# } else {
|
||||
# if (open(LIST, "<${General::swroot}/patches/available")) {
|
||||
# my @list = <LIST>;
|
||||
# close(LIST);
|
||||
# }
|
||||
# $warnmessage = $Lang::tr{'could not download the available updates list'};
|
||||
# }
|
||||
|
||||
|
||||
if (copy ($uploadsettings{'FH'}, "/var/patches/patch-$$.tar.gz.gpg") != 1) {
|
||||
$errormessage = $!;
|
||||
} else {
|
||||
my $exitcode = system("/usr/local/bin/installpackage $$ > /dev/null") >> 8;
|
||||
if ($exitcode == 0) {
|
||||
#Hack to get correct version displayed after update
|
||||
open (XX,"perl -e \"require'${General::swroot}/general-functions.pl';print \\\$General::version\"|");
|
||||
$General::version=<XX>;
|
||||
close (XX);
|
||||
&General::log("$Lang::tr{'the following update was successfully installed'} ($General::version)");
|
||||
}
|
||||
elsif($exitcode == 2) {
|
||||
$errormessage = "$Lang::tr{'could not create directory'}";
|
||||
}
|
||||
elsif($exitcode == 3) {
|
||||
$errormessage = "$Lang::tr{'this is not an authorised update'}";
|
||||
}
|
||||
elsif($exitcode == 4) {
|
||||
$errormessage = "$Lang::tr{'this is not a valid archive'}";
|
||||
}
|
||||
elsif($exitcode == 5) {
|
||||
$errormessage = "$Lang::tr{'could not open update information file'}";
|
||||
}
|
||||
elsif($exitcode == 6) {
|
||||
$errormessage = "$Lang::tr{'could not open installed updates file'}";
|
||||
}
|
||||
elsif($exitcode == 7) {
|
||||
$errormessage = "$Lang::tr{'this update is already installed'}";
|
||||
}
|
||||
elsif($exitcode == 11) {
|
||||
$errormessage = "$Lang::tr{'not enough disk space'}";
|
||||
} else {
|
||||
$errormessage = "$Lang::tr{'package failed to install'}";
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ($uploadsettings{'ACTION'} eq $Lang::tr{'refresh update list'}) {
|
||||
my $return = &downloadlist();
|
||||
if ($return && $return->is_success) {
|
||||
if (open(LIST, ">${General::swroot}/patches/available")) {
|
||||
flock LIST, 2;
|
||||
my @this = split(/----START LIST----\n/,$return->content);
|
||||
print LIST $this[1];
|
||||
close(LIST);
|
||||
&General::log($Lang::tr{'successfully refreshed updates list'});
|
||||
} else {
|
||||
$errormessage = $Lang::tr{'could not open available updates file'};
|
||||
}
|
||||
} else {
|
||||
$errormessage = $Lang::tr{'could not download the available updates list'};
|
||||
}
|
||||
}
|
||||
elsif ($uploadsettings{'ACTION'} eq "$Lang::tr{'clear cache'} (squid)") {
|
||||
system('/usr/local/bin/restartsquid','-f');
|
||||
}
|
||||
|
||||
if (!open(AV, "<${General::swroot}/patches/available")) {
|
||||
$errormessage = $Lang::tr{'could not open available updates file'};
|
||||
} else {
|
||||
@av = <AV>;
|
||||
close(AV);
|
||||
}
|
||||
if (!open (PF, "<${General::swroot}/patches/installed")) {
|
||||
$errormessage = $Lang::tr{'could not open installed updates file'};
|
||||
} else {
|
||||
@pf = <PF>;
|
||||
close (PF);
|
||||
#substract installed patch from list displayed (AV list may not be updated)
|
||||
foreach my $P (@pf) {
|
||||
$P =~ /^(...)/;
|
||||
my $order=$1;
|
||||
my $idx=0;
|
||||
foreach my $A (@av) {
|
||||
$A =~ /^(...)/;
|
||||
if ($1 eq $order) { # match
|
||||
splice (@av,$idx,1);
|
||||
last;
|
||||
}
|
||||
$idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&Header::openpage($Lang::tr{'updates'}, 1, '');
|
||||
|
||||
&Header::openbigbox('100%', 'left', 'download.png', $errormessage);
|
||||
|
||||
if ($errormessage) {
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
|
||||
print $errormessage;
|
||||
print " ";
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ($warnmessage) {
|
||||
&Header::openbox('100%', 'LEFT', "$Lang::tr{'warning messages'}:");
|
||||
print "<CLASS NAME='base'>$warnmessage \n";
|
||||
print " </CLASS>\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'available updates'});
|
||||
|
||||
if ( defined $av[0] ) {
|
||||
print $Lang::tr{'there are updates available'};
|
||||
print qq|<table width='100%' border='0' cellpadding='2' cellspacing='0'>
|
||||
<tr>
|
||||
<td width='5%'><b>$Lang::tr{'id'}</b></td>
|
||||
<td width='15%'><b>$Lang::tr{'title'}</b></td>
|
||||
<td width='50%'><b>$Lang::tr{'description'}</b></td>
|
||||
<td width='15%'><b>$Lang::tr{'released'}</b></td>
|
||||
<td width='15%'> </td>
|
||||
</tr>
|
||||
|;
|
||||
foreach (@av) {
|
||||
my @temp = split(/\|/,$_);
|
||||
print "<tr><td valign='top'>$temp[0]</td><td valign='top'>$temp[1]</td><td valign='top'>$temp[2]</td><td valign='top'>$temp[3]</td><td valign='top'><a href='$temp[4]' target='_new'>$Lang::tr{'info'}</a></td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
} else {
|
||||
print $Lang::tr{'all updates installed'};
|
||||
}
|
||||
|
||||
print qq|<hr /><br>
|
||||
$Lang::tr{'to install an update'}
|
||||
<br />
|
||||
<form method='post' action='/cgi-bin/updates.cgi' enctype='multipart/form-data'>
|
||||
<table>
|
||||
<tr>
|
||||
<td align='right' class='base'>
|
||||
<b>$Lang::tr{'upload update file'}</b></td>
|
||||
<td><input type="file" size='40' name="FH" /> <input type='submit' name='ACTION' value='$Lang::tr{'upload'}' />
|
||||
</td></tr>
|
||||
</table>|;
|
||||
|
||||
print "<b>$Lang::tr{'disk usage'}</b>";
|
||||
open (XX,'df -h / /var/log|');
|
||||
my @df=<XX>;
|
||||
close (XX);
|
||||
print "<table cellpadding='2'>";
|
||||
map ( $_ =~ s/ +/<td>/g,@df); # tablify each line!
|
||||
print "<tr><td>$df[0]</tr>";
|
||||
print "<tr><td>$df[1]</tr>";
|
||||
print "<tr><td>$df[2]<td><input type='submit' name='ACTION' value='$Lang::tr{'clear cache'} (squid)' /></tr>";
|
||||
print "</table>";
|
||||
|
||||
print "\n<hr />";
|
||||
print "\n<table width='100%'>\n<tr>";
|
||||
print "\n\t<td width='50%'> </td>";
|
||||
print "\n\t<td width='50%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'refresh update list'}' /></td></tr>";
|
||||
print "\n</table>\n";
|
||||
print "</form>";
|
||||
|
||||
&Header::closebox();
|
||||
|
||||
&Header::openbox('100%', 'LEFT', $Lang::tr{'installed updates'});
|
||||
|
||||
print qq|<table width='100%' border='0' cellpadding='2' cellspacing='0'>
|
||||
<tr>
|
||||
<td width='5%'><b>$Lang::tr{'id'}</b></td>
|
||||
<td width='15%'><b>$Lang::tr{'title'}</b></td>
|
||||
<td width='50%'><b>$Lang::tr{'description'}</b></td>
|
||||
<td width='15%'><b>$Lang::tr{'released'}</b></td>
|
||||
<td width='15%'><b>$Lang::tr{'installed'}</b></td>
|
||||
</tr>
|
||||
|;
|
||||
|
||||
foreach my $pf (@pf) {
|
||||
next if $pf =~ m/^#/;
|
||||
my @temp = split(/\|/,$pf);
|
||||
#??? @av = grep(!/^$temp[0]/, @av);
|
||||
print "<tr><td valign='top'>" . join("</td><td valign='top'>",@temp) . "</td></tr>";
|
||||
}
|
||||
close(PF);
|
||||
|
||||
print "</table>";
|
||||
|
||||
&Header::closebox();
|
||||
|
||||
&Header::closebigbox();
|
||||
|
||||
&Header::closepage();
|
||||
|
||||
sub downloadlist {
|
||||
unless (-e "${General::swroot}/red/active") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $downloader = LWP::UserAgent->new;
|
||||
$downloader->timeout(5);
|
||||
|
||||
my %proxysettings=();
|
||||
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
||||
|
||||
if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
|
||||
my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
|
||||
if ($proxysettings{'UPSTREAM_USER'}) {
|
||||
$downloader->proxy("http","http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$peer:$peerport/");
|
||||
} else {
|
||||
$downloader->proxy("http","http://$peer:$peerport/");
|
||||
}
|
||||
}
|
||||
|
||||
return $downloader->get("http://www.ipcop.org/patches/${General::version}", 'Cache-Control', 'no-cache');
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
File diff suppressed because it is too large
Load Diff
@@ -79,9 +79,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP)/build_unix && ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx
|
||||
cd $(DIR_APP)/build_unix && make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread"
|
||||
cd $(DIR_APP)/build_unix && make
|
||||
cd $(DIR_APP)/build_unix && make docdir=/usr/share/doc/$(THISAPP) install
|
||||
chown root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db*
|
||||
chown -R root:root /usr/share/doc/$(THISAPP)
|
||||
chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db*
|
||||
# chown -v root:root /usr/bin/berkeley_db_svc
|
||||
chown -v -R root:root /usr/share/doc/$(THISAPP)
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
@@ -117,7 +117,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
mkdir -p /install/cdrom/boot/isolinux; \
|
||||
dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \
|
||||
cp /install/images/cdinitrd.gz /install/cdrom/boot/isolinux/instroot.gz; \
|
||||
cp /boot/vmlinuz-installer /install/cdrom/boot/isolinux/vmlinuz; \
|
||||
cp /boot/vmlinuz-installer /install/cdrom/boot/isolinux/vmlinuz; \
|
||||
cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \
|
||||
cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \
|
||||
sed -e 's/boot IPFire/boot IPFire $(VERSION)/' $(DIR_SRC)/config/kernel/install-message \
|
||||
|
||||
@@ -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 portfw \
|
||||
eagle-usb eciadsl ethernet isdn key langs logging main modem optionsfw patches pakfire portfw \
|
||||
ppp private proxy red remote shaping snort time uplinks vpn wireless xtaccess ; do \
|
||||
mkdir -p $(CONFIG_ROOT)/$$i; \
|
||||
done
|
||||
@@ -78,7 +78,7 @@ $(TARGET) :
|
||||
cp $(DIR_SRC)/config/cfgroot/header.pl $(CONFIG_ROOT)/
|
||||
cp $(DIR_SRC)/config/cfgroot/general-functions.pl $(CONFIG_ROOT)/
|
||||
cp $(DIR_SRC)/config/cfgroot/lang.pl $(CONFIG_ROOT)/
|
||||
cp $(DIR_SRC)/config/cfgroot/countries.pl $(CONFIG_ROOT)/
|
||||
cp $(DIR_SRC)/config/cfgroot/countries.pl $(CONFIG_ROOT)/
|
||||
cp $(DIR_SRC)/config/cfgroot/backup-exclude $(CONFIG_ROOT)/backup/exclude.system
|
||||
cp $(DIR_SRC)/config/cfgroot/backup-include $(CONFIG_ROOT)/backup/include.system
|
||||
cp $(DIR_SRC)/config/cfgroot/backup-exclude.hardware $(CONFIG_ROOT)/backup/exclude.hardware
|
||||
@@ -89,7 +89,7 @@ $(TARGET) :
|
||||
cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config
|
||||
cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings
|
||||
cp $(DIR_SRC)/config/cfgroot/logging-settings $(CONFIG_ROOT)/logging/settings
|
||||
cp $(DIR_SRC)/config/cfgroot/ipcop.gpg $(CONFIG_ROOT)/key/
|
||||
# cp $(DIR_SRC)/config/cfgroot/ipcop.gpg $(CONFIG_ROOT)/key/
|
||||
cp $(DIR_SRC)/langs/list $(CONFIG_ROOT)/langs/
|
||||
|
||||
# Oneliner configfiles
|
||||
@@ -97,7 +97,7 @@ $(TARGET) :
|
||||
echo "VPN_DELAYED_START=0" >>$(CONFIG_ROOT)/vpn/settings
|
||||
echo "01" > $(CONFIG_ROOT)/certs/serial
|
||||
echo "nameserver 1.2.3.4" > $(CONFIG_ROOT)/ppp/fake-resolv.conf
|
||||
echo "DISABLEPING=NO" > $(CONFIG_ROOT)/optionsfw/settings
|
||||
echo "DISABLEPING=NO" > $(CONFIG_ROOT)/optionsfw/settings
|
||||
|
||||
# Symbolic links
|
||||
ln -sf /etc/rc.d/rc.updatered $(CONFIG_ROOT)/dhcpc/dhcpcd.exe
|
||||
|
||||
4
lfs/ntp
4
lfs/ntp
@@ -84,8 +84,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && make install
|
||||
-mkdir /etc/ntp
|
||||
chown -R ntp:ntp /etc/ntp
|
||||
echo "restrict default nomodify noquery" > /etc/ntp.conf
|
||||
echo "server 127.127.1.0" >> /etc/ntp.conf
|
||||
echo "restrict default nomodify noquery" > /etc/ntp.conf
|
||||
echo "server 127.127.1.0" >> /etc/ntp.conf
|
||||
echo "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf
|
||||
echo "driftfile /etc/ntp/drift" >> /etc/ntp.conf
|
||||
@rm -rf $(DIR_APP)
|
||||
|
||||
@@ -83,5 +83,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
'AUXLIBS=-L/usr/lib -L/opt/lampp/lib/mysql -L/opt/lampp/lib -lmysqlclient -lz -lm -lssl -lsasl2 -lcrypto -lpq'
|
||||
cd $(DIR_APP) && make
|
||||
cd $(DIR_APP) && sh postfix-install -non-interactive
|
||||
cp -v /usr/src/config/etc/aliases /etc/aliases
|
||||
cd /etc/ && postmap aliases
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
14
make.sh
14
make.sh
@@ -29,11 +29,11 @@
|
||||
#
|
||||
|
||||
NAME="IPFire" # Software name
|
||||
SNAME="ipfire" # Short name
|
||||
SNAME="ipfire" # Short name
|
||||
VERSION="1.4" # Version number
|
||||
PREVIOUSTAG=IPCOP_v1_4_10_FINAL
|
||||
SLOGAN="We save your network" # Software slogan
|
||||
CONFIG_ROOT=/var/ipfire # Configuration rootdir
|
||||
# PREVIOUSTAG=IPCOP_v1_4_10_FINAL
|
||||
SLOGAN="We secure your network" # Software slogan
|
||||
CONFIG_ROOT=/var/ipfire # Configuration rootdir
|
||||
NICE=10
|
||||
MAX_RETRIES=3 # prefetch/check loop
|
||||
KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
|
||||
@@ -707,10 +707,10 @@ buildpackages() {
|
||||
rm -f $BASEDIR/doc/packages-list
|
||||
for i in `ls -1tr $BASEDIR/log/[^_]*`; do
|
||||
if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
|
||||
echo "* `basename $i`" >>$BASEDIR/doc/packages-list
|
||||
echo " * `basename $i`" >>$BASEDIR/doc/packages-list
|
||||
fi
|
||||
done
|
||||
echo "!!! List of softwares used to build $NAME Version:$VERSION" > $BASEDIR/doc/packages-list.txt
|
||||
echo "====== List of softwares used to build $NAME Version: $VERSION ======" > $BASEDIR/doc/packages-list.txt
|
||||
grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
|
||||
$BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
|
||||
rm -f $BASEDIR/doc/packages-list
|
||||
@@ -1027,4 +1027,4 @@ gettoolchain)
|
||||
cat doc/make.sh-usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
@@ -485,3 +485,5 @@ if ($settings{'CONFIG_TYPE'} =~ /^(4|5|6|7)$/ && -e "$rrdlog/BLUE.rrd") {
|
||||
updateifgraph ("BLUE", "month");
|
||||
updateifgraph ("BLUE", "year");
|
||||
}
|
||||
|
||||
chmod 777 /home/httpd/html/{graphs,sgraph} -R
|
||||
Reference in New Issue
Block a user