DHCP und Squid-Initscripts optimiert fuer ein schnelleres starten und stoppen.

Which und lsof zur ISO hinzugefuegt.
Update-XLrator cacht unsere Pakfire-Pakete und rpm/deb-Pakete.
Pakfire weitergebaut.
UPnP aus dem Menue genommen.
Samba-Symlinks korrigiert.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@657 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-07-01 21:41:27 +00:00
parent 32ab16debd
commit 186e3d2cf8
16 changed files with 245 additions and 75 deletions

View File

@@ -32,7 +32,7 @@
'caption' => 'UPnP',
'uri' => '/cgi-bin/upnp.cgi',
'title' => "Universal Plug and Play",
'enabled' => 1,
'enabled' => 0,
};
$subfirewall->{'70.fwopts'} = {
'caption' => $Lang::tr{'options fw'},

View File

@@ -2,7 +2,7 @@
bin/gunzip
bin/gzip
bin/uncompress
#bin/zcat
bin/zcat
#usr/bin/gzexe
#usr/bin/zcmp
#usr/bin/zdiff

View File

@@ -0,0 +1 @@
usr/bin/lsof

View File

@@ -0,0 +1,3 @@
usr/bin/which
#usr/info/which.info
#usr/man/man1/which.1

View File

@@ -1,4 +1,5 @@
etc/pam.d/cups
etc/rc.d/init.d/cups
#etc/rc0.d
#etc/rc0.d/K00cups
#etc/rc2.d
@@ -563,9 +564,9 @@ usr/share/cups/templates/test-page.tmpl
usr/share/cups/templates/trailer.tmpl
usr/share/cups/templates/users.tmpl
#usr/share/doc/cups
#usr/share/doc/cups/cups-printable.css
#usr/share/doc/cups/cups.css
#usr/share/doc/cups/de
usr/share/doc/cups/cups-printable.css
usr/share/doc/cups/cups.css
usr/share/doc/cups/de
#usr/share/doc/cups/de/images
#usr/share/doc/cups/de/images/button-accept-jobs.gif
#usr/share/doc/cups/de/images/button-add-class.gif
@@ -675,7 +676,7 @@ usr/share/cups/templates/users.tmpl
#usr/share/doc/cups/es/images/button-view-printable-version.gif
#usr/share/doc/cups/es/index.html
#usr/share/doc/cups/favicon.ico
#usr/share/doc/cups/help
usr/share/doc/cups/help
#usr/share/doc/cups/help/api-array.html
#usr/share/doc/cups/help/api-cups.html
#usr/share/doc/cups/help/api-filedir.html
@@ -740,7 +741,7 @@ usr/share/cups/templates/users.tmpl
#usr/share/doc/cups/help/standard.html
#usr/share/doc/cups/help/translation.html
#usr/share/doc/cups/help/whatsnew.html
#usr/share/doc/cups/images
usr/share/doc/cups/images
#usr/share/doc/cups/images/bottom-left.gif
#usr/share/doc/cups/images/bottom-right.gif
#usr/share/doc/cups/images/button-accept-jobs.gif
@@ -815,7 +816,7 @@ usr/share/cups/templates/users.tmpl
#usr/share/doc/cups/images/web-printer-status.gif
#usr/share/doc/cups/images/web-set-printer-options.gif
#usr/share/doc/cups/images/web-test-page.gif
#usr/share/doc/cups/index.html
usr/share/doc/cups/index.html
#usr/share/doc/cups/ja
#usr/share/doc/cups/ja/images
#usr/share/doc/cups/ja/images/button-accept-jobs.gif
@@ -922,7 +923,7 @@ usr/share/cups/templates/users.tmpl
#usr/share/doc/cups/pl/images/button-view-page-log.gif
#usr/share/doc/cups/pl/images/button-view-printable-version.gif
#usr/share/doc/cups/pl/index.html
#usr/share/doc/cups/robots.txt
usr/share/doc/cups/robots.txt
#usr/share/doc/cups/sv
#usr/share/doc/cups/sv/images
#usr/share/doc/cups/sv/images/button-accept-jobs.gif

View File

@@ -124,9 +124,28 @@ while (<>) {
if ($dsturl =~ m@^http://download[0-99]\.avast\.com/.*\.(exe|zip|vps|stamp|vpu)$@i)
{
$from_local_cache = &cache_access($dsturl,$hostaddr,$username,"Avast");
}
# -----------------------------------------------------------
# Section: IPFire Downloads
# -----------------------------------------------------------
if ($dsturl =~ m@^[f|h]t?tp://.*\.(ipfire)$@i)
{
$from_local_cache = &cache_access($dsturl,$hostaddr,$username,"IPFire");
}
# -----------------------------------------------------------
# Section: Linux Downloads
# -----------------------------------------------------------
if ($dsturl =~ m@^[f|h]t?tp://.*\.(deb|rpm)$@i)
{
$from_local_cache = &cache_access($dsturl,$hostaddr,$username,"Linux");
}
# -----------------------------------------------------------
}

View File

@@ -176,7 +176,6 @@
* mp3blaster-3.2.3
* mpfire-ipfire
* mpg123-0.59r
* mpg123-0.60
* mtd-CVS-20070507
* mtools-3.9.10
* mysql-5.0.24a

View File

@@ -79,9 +79,9 @@ END
system("/usr/local/bin/pakfire update --force");
} elsif ($pakfiresettings{'ACTION'} eq 'unlock') {
} elsif ($pakfiresettings{'ACTION'} eq 'upgrade') {
&Pakfire::lock("off");
system("/usr/local/bin/pakfire upgrade -y");
} elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") {
@@ -108,23 +108,32 @@ if ($errormessage) {
&Header::closebox();
}
if ( -e "/opt/pakfire/pakfire.lock" ) {
my $return = `pidof pakfire`;
chomp($return);
if ($return) {
&Header::openbox("100%", "center", "Aktiv");
print <<END;
<table>
<tr><td>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='hidden' name='ACTION' value='unlock' />
<input type='image' src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />&nbsp;
</form>
<img src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />&nbsp;
<td>
Pakfire fuehrt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.
<tr><td colspan='2' align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='image' alt='$Lang::tr{'reload'}' src='/images/view-refresh.png' />
</form>
### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
<tr><td colspan='2' align='left'><pre>
END
my @output = `tail /var/log/messages | grep pakfire`;
foreach (@output) {
print "$_";
}
print <<END;
</pre>
</table>
END
### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
@@ -133,6 +142,8 @@ END
&Header::openbox("100%", "center", "Pakfire");
system("pakfire update &>dev/null");
print <<END;
<table width='100%'>
<tr><td width='40%' align="center">Verfuegbare Addons:<br />

View File

@@ -462,6 +462,12 @@ END
} elsif ($metadata[1] eq 'Avast')
{
print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
} elsif ($metadata[1] eq 'IPFire')
{
print "<img src='/images/updxl-src-ipfire.gif' alt='IPFire'}' />&nbsp;</td>\n";
} elsif ($metadata[1] eq 'Linux')
{
print "<img src='/images/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
} else
{
print "<img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' />&nbsp;</td>\n";
@@ -541,18 +547,22 @@ print <<END
<td align='center'><img src='/images/updxl-src-symantec.gif' alt='Symantec' /></td>
<td class='base'>Symantec</td>
<td class='base'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' /></td>
<td class='base'>$Lang::tr{'updxlrtr unknown'}</td>
<td align='center'><img src='/images/updxl-src-avira.gif' alt='Avira' /></td>
<td class='base'>Avira</td>
</tr>
<tr>
<td class='base' colspan='2'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-ipfire.gif' alt='IPFire' /></td>
<td class='base'>IPFire</td>
<td class='base'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-linux.gif' alt='Linux' /></td>
<td class='base'>Linux</td>
<td class='base'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-avast.gif' alt='Avast' /></td>
<td class='base'>Avast</td>
<td class='base'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-avira.gif' alt='Avira' /></td>
<td class='base'>Avira</td>
<td class='base'>&nbsp;</td>
<td class='base' colspan='5'>&nbsp;</td>
<td align='center'><img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' /></td>
<td class='base'>$Lang::tr{'updxlrtr unknown'}</td>
</tr>
</table>
END

79
lfs/lsof Normal file
View File

@@ -0,0 +1,79 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop 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. #
# #
# IPCop 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 IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 4.78
THISAPP = lsof-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0f8aac305454e8cd8e0ac534c6daccea
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./Configure linux -n
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && install -m 4750 -o root -g nobody lsof /usr/bin
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -536,6 +536,7 @@ buildipfire() {
ipfiremake alsa
ipfiremake mp3blaster
ipfiremake which
ipfiremake lsof
}
buildinstaller() {

View File

@@ -25,7 +25,7 @@ case "$1" in
boot_mesg "Starting DHCP Server..."
loadproc /usr/sbin/dhcpd -q ${devices}
sleep 20 && chmod 644 /var/run/dhcpd.pid # Fix because silly dhcpd creates its pid with mode 640
(sleep 20 && chmod 644 /var/run/dhcpd.pid) & # Fix because silly dhcpd creates its pid with mode 640
;;
stop)

View File

@@ -69,13 +69,14 @@ case "$1" in
iptables -t nat -F SQUID
squid -k shutdown >/dev/null 2>&1
evaluate_retval
killproc /usr/sbin/squid >/dev/null
killproc /usr/bin/squidGuard >/dev/null
killproc /usr/sbin/updxlrator >/dev/null
killproc /usr/sbin/squid >/dev/null
;;
restart)
$0 stop
sleep 1
sleep 5
$0 start
;;

View File

@@ -178,8 +178,9 @@ if (strcmp(argv[1], "enable")==0)
{
safe_system("touch /var/ipfire/samba/enable");
safe_system("/etc/rc.d/init.d/samba start");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S50samba");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/K50samba");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S45samba");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc0.d/K48samba");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc6.d/K48samba");
return 0;
}
@@ -187,8 +188,7 @@ if (strcmp(argv[1], "disable")==0)
{
safe_system("unlink /var/ipfire/samba/enable");
safe_system("/etc/rc.d/init.d/samba stop");
safe_system("unlink /etc/rc.d/rc3.d/S50samba");
safe_system("unlink /etc/rc.d/rc3.d/K50samba");
safe_system("rm -rf /etc/rc.d/rc*.d/*samba");
return 0;
}
return 0;

View File

@@ -82,8 +82,10 @@ sub fetchfile {
&General::readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings);
if ($proxysettings{'UPSTREAM_PROXY'}) {
logger("Using upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\"");
if ($proxysettings{'UPSTREAM_USER'}) {
$ua->proxy("http","http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/");
logger(" Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\"");
} else {
$ua->proxy("http","http://$proxysettings{'UPSTREAM_PROXY'}/");
}
@@ -101,9 +103,17 @@ sub fetchfile {
}
if ($response->is_success) {
if (open(FILE, ">$Conf::cachedir/$bfile")) {
if (open(FILE, ">$Conf::tmpdir/$bfile")) {
print FILE $response->content;
close(FILE);
logger("File received. Start checking signature...");
if (system("gpg --verify \"$Conf::tmpdir/$bfile\" &>/dev/null") eq 0) {
logger("Signature of $bfile is fine.");
move("$Conf::tmpdir/$bfile","$Conf::cachedir/$bfile");
} else {
message("The downloaded file ($file) wasn't verified by IPFire.org. Sorry - Exiting...");
exit 1;
}
logger("Download successfully done from $host (file: $file).");
$allok = 1;
return 0;
@@ -282,14 +292,19 @@ sub resolvedeps {
getmetafile("$pak");
message("\n## Resolving dependencies for $pak...");
message("");
message("## Resolving dependencies for $pak...");
#if (&isinstalled($pak) eq 0) {
# my @empty;
# return @empty;
#}
open(FILE, "<$Conf::dbdir/meta/meta-$pak");
my @file = <FILE>;
close(FILE);
my $line;
my (@templine, @deps, @tempdeps);
my (@templine, @deps, @tempdeps, @all);
foreach $line (@file) {
@templine = split(/\: /,$line);
if ("$templine[0]" eq "Dependencies") {
@@ -299,8 +314,14 @@ sub resolvedeps {
chomp (@deps);
foreach (@deps) {
if ($_) {
message("### Found dependency: $_");
push(@tempdeps,$_);
my $return = &isinstalled($_);
if ($return eq 0) {
message("### Dependency is already installed: $_");
} else {
message("### Need to install dependency: $_");
push(@tempdeps,$_);
push(@all,$_);
}
}
}
@@ -310,14 +331,19 @@ sub resolvedeps {
my @newdeps = resolvedeps("$_");
foreach(@newdeps) {
unless (($_ eq " ") || ($_ eq "")) {
message("### Found dependency: $_");
push(@deps,$_);
my $return = &isinstalled($_);
if ($return eq 0) {
message("### Dependency is already installed: $_");
} else {
message("### Need to install dependency: $_");
push(@all,$_);
}
}
}
}
}
chomp (@deps);
return @deps;
chomp (@all);
return @all;
}
sub cleanup {
@@ -437,7 +463,9 @@ sub getpak {
sub setuppak {
my $pak = shift;
message("We are going to install: $pak");
message("################################################################################");
message("# --> Installing: $pak");
message("################################################################################");
decryptpak("$pak");
@@ -448,6 +476,7 @@ sub setuppak {
cleanup("tmp");
copy("$Conf::dbdir/meta/meta-$pak","$Conf::dbdir/installed/");
message("Setup completed. Congratulations!");
message("################################################################################");
} else {
message("Setup returned: $return. Sorry. Please search our forum to find a solution for this problem.");
exit $return;
@@ -455,6 +484,16 @@ sub setuppak {
return $return;
}
sub isinstalled {
my $pak = shift;
if ( open(FILE,"<$Conf::dbdir/installed/meta-$pak") ) {
close(FILE);
return 0;
} else {
return 1;
}
}
sub upgradepak {
my $pak = shift;
@@ -546,22 +585,6 @@ sub senduuid {
}
}
sub lock {
my $status = shift;
if ("$status" eq "on") {
system("touch /opt/pakfire/pakfire.lock");
system("chmod 777 /opt/pakfire/pakfire.lock");
logger("Created lock");
} else {
if (system("rm -f /opt/pakfire/pakfire.lock >/dev/null 2>&1")) {
logger("Successfully removed lock.");
} else {
logger("Couldn't remove lock.");
}
}
return 0;
}
sub checkcryptodb {
my $myid = "64D96617"; # Our own gpg-key
my $trustid = "65D0FD58"; # Id of CaCert

View File

@@ -28,7 +28,6 @@
}
if ("$ARGV[0]" eq "install") {
&Pakfire::lock("on");
shift;
### Make sure that the list is not outdated.
@@ -45,9 +44,15 @@
my @temp;
my @templine;
my $found = 0;
my $return;
my @all;
foreach $pak (@ARGV) {
unless ("$pak" =~ "^-") {
$return = &Pakfire::isinstalled($pak);
if ($return eq 0) {
&Pakfire::message("Package $pak is already installed.");
next;
}
$found = 0;
foreach (@db) {
@templine = split(/;/,$_);
@@ -63,30 +68,45 @@
break;
}
}
&Pakfire::message("\nThe pak \"$pak\" is not known. Please try running \"pakfire update\".") if ($found == 0);
&Pakfire::message("");
&Pakfire::message("The pak \"$pak\" is not known. Please try running \"pakfire update\".") if ($found == 0);
}
}
unless (@paks) {
&Pakfire::message("No packages to install. Exiting...");
exit 1;
}
&Pakfire::message("\n\n### Packages to install:");
foreach (sort @paks) {
my $size = &Pakfire::getsize("$_");
&Pakfire::message("");
&Pakfire::message("");
&Pakfire::message("### Packages to install:");
foreach $pak (sort @paks) {
my $size = &Pakfire::getsize("$pak");
$size = &Pakfire::beautifysize($size);
&Pakfire::message("# $_ \t\t - $size");
&Pakfire::message("# $pak \t\t - $size");
}
&Pakfire::message("\n### Packages to install for dependencies:") if @deps;
foreach (sort @deps) {
my $size = &Pakfire::getsize("$_");
if (@deps) {
my %sort = map{ $_, 1 } @deps;
@deps = sort keys %sort;
&Pakfire::message("");
&Pakfire::message("### Packages to install for dependencies:");
}
foreach $dep (sort @deps) {
my $size = &Pakfire::getsize("$dep");
$size = &Pakfire::beautifysize($size);
&Pakfire::message("# $_ \t\t - $size");
&Pakfire::message("# $dep \t\t - $size");
}
my $totalsize;
foreach (@all) {
$totalsize = ($totalsize + &Pakfire::getsize("$_"));
foreach $pak (@all) {
$totalsize = ($totalsize + &Pakfire::getsize("$pak"));
}
$totalsize = &Pakfire::beautifysize($totalsize);
&Pakfire::message("\n### Total size: \t ~ $totalsize\n");
&Pakfire::message("");
&Pakfire::message("### Total size: \t ~ $totalsize");
&Pakfire::message("");
if ($interactive) {
&Pakfire::message("Is this okay? [y/N]");
@@ -98,17 +118,19 @@
exit 1;
}
}
my %sort = map{ $_, 1 } @all;
@all = sort keys %sort;
### Download first
foreach (sort @all) {
&Pakfire::message("# --> Downloading: $_");
&Pakfire::getpak("$_", "");
foreach $pak (sort @all) {
&Pakfire::message("# --> Downloading: $pak");
&Pakfire::getpak("$pak", "");
}
foreach (sort @all) {
&Pakfire::setuppak("$_");
foreach $pak (sort @all) {
&Pakfire::setuppak("$pak") if ($pak ne "");
}
&Pakfire::lock("off");
} elsif ("$ARGV[0]" eq "remove") {