'caption' => 'UPnP',
'uri' => '/cgi-bin/upnp.cgi',
'title' => "Universal Plug and Play",
- 'enabled' => 1,
+ 'enabled' => 0,
};
$subfirewall->{'70.fwopts'} = {
'caption' => $Lang::tr{'options fw'},
bin/gunzip
bin/gzip
bin/uncompress
-#bin/zcat
+bin/zcat
#usr/bin/gzexe
#usr/bin/zcmp
#usr/bin/zdiff
--- /dev/null
+usr/bin/lsof
--- /dev/null
+usr/bin/which
+#usr/info/which.info
+#usr/man/man1/which.1
etc/pam.d/cups
+etc/rc.d/init.d/cups
#etc/rc0.d
#etc/rc0.d/K00cups
#etc/rc2.d
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
#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
#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
#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
#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
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");
+ }
+
+ # -----------------------------------------------------------
+
}
* mp3blaster-3.2.3
* mpfire-ipfire
* mpg123-0.59r
-* mpg123-0.60
* mtd-CVS-20070507
* mtools-3.9.10
* mysql-5.0.24a
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'}") {
&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'}' />
- </form>
+ <img src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />
<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();
&Header::openbox("100%", "center", "Pakfire");
+system("pakfire update &>dev/null");
+
print <<END;
<table width='100%'>
<tr><td width='40%' align="center">Verfuegbare Addons:<br />
} elsif ($metadata[1] eq 'Avast')
{
print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' /> </td>\n";
+ } elsif ($metadata[1] eq 'IPFire')
+ {
+ print "<img src='/images/updxl-src-ipfire.gif' alt='IPFire'}' /> </td>\n";
+ } elsif ($metadata[1] eq 'Linux')
+ {
+ print "<img src='/images/updxl-src-linux.gif' alt='Linux'}' /> </td>\n";
} else
{
print "<img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' /> </td>\n";
<td align='center'><img src='/images/updxl-src-symantec.gif' alt='Symantec' /></td>
<td class='base'>Symantec</td>
<td class='base'> </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'> </td>
+ <td align='center'><img src='/images/updxl-src-ipfire.gif' alt='IPFire' /></td>
+ <td class='base'>IPFire</td>
+ <td class='base'> </td>
+ <td align='center'><img src='/images/updxl-src-linux.gif' alt='Linux' /></td>
+ <td class='base'>Linux</td>
+ <td class='base'> </td>
<td align='center'><img src='/images/updxl-src-avast.gif' alt='Avast' /></td>
<td class='base'>Avast</td>
<td class='base'> </td>
- <td align='center'><img src='/images/updxl-src-avira.gif' alt='Avira' /></td>
- <td class='base'>Avira</td>
- <td class='base'> </td>
- <td class='base' colspan='5'> </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
--- /dev/null
+###############################################################################
+# 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)
ipfiremake alsa
ipfiremake mp3blaster
ipfiremake which
+ ipfiremake lsof
}
buildinstaller() {
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)
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
;;
{
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;
}
{
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;
&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'}/");
}
}
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;
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") {
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,$_);
+ }
}
}
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 {
sub setuppak {
my $pak = shift;
- message("We are going to install: $pak");
+ message("################################################################################");
+ message("# --> Installing: $pak");
+ message("################################################################################");
decryptpak("$pak");
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;
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;
}
}
-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
}
if ("$ARGV[0]" eq "install") {
- &Pakfire::lock("on");
shift;
### Make sure that the list is not outdated.
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(/;/,$_);
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]");
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") {