From 5b2a12ff8ad39591a5a57a0f2122edc2934f5ec3 Mon Sep 17 00:00:00 2001 From: ms Date: Tue, 19 Jun 2007 18:40:52 +0000 Subject: [PATCH] Am Pakfire weitergearbeitet. CGI erweitert und mit neuen Funktionen versehen. Paketformat grundlegend geaendert. UpdateBooster gefixt. Avira+Avast als Updatequelle eingefuegt. VPN-Watch ins log.dat. DHCP-Server startet nach der Installation. Einen String im Installer verschoenert :D git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@639 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/grub/grub.conf | 6 +- config/updxlrator/download | 7 +- config/updxlrator/updxlrator | 20 +- doc/language_issues.de | 3 + doc/language_issues.en | 3 + html/cgi-bin/logs.cgi/log.dat | 2 +- html/cgi-bin/pakfire.cgi | 101 ++++-- html/cgi-bin/updatexlrator.cgi | 18 +- html/html/images/updxl-src-avast.gif | Bin 0 -> 1117 bytes html/html/images/updxl-src-avira.gif | Bin 0 -> 1045 bytes langs/de/install/lang_de.c | 2 +- langs/en/install/lang_en.c | 2 +- lfs/Config | 19 +- lfs/mp3blaster | 2 +- lfs/mpg123 | 2 + src/install+setup/setup/dhcp.c | 524 +++++++++++++-------------- src/misc-progs/pakfire.c | 9 +- src/pakfire/lib/functions.pl | 32 +- src/pakfire/pakfire | 32 +- src/paks/files | 5 + tools/make-functions | 12 +- 21 files changed, 469 insertions(+), 332 deletions(-) create mode 100644 html/html/images/updxl-src-avast.gif create mode 100644 html/html/images/updxl-src-avira.gif create mode 100644 src/paks/files diff --git a/config/grub/grub.conf b/config/grub/grub.conf index bfac86385a..6f86514579 100644 --- a/config/grub/grub.conf +++ b/config/grub/grub.conf @@ -5,7 +5,7 @@ background = ffffff gfxmenu /grub/message title IPFire (1024x768) root (hd0,0) - kernel /vmlinuz-ipfire root=ROOT panic=10 vga=791 splash=silent MOUNT + kernel /vmlinuz-ipfire root=ROOT panic=10 vga=791 MOUNT initrd /ipfirerd.img savedefault 0 title IPFire (VESA) @@ -15,7 +15,7 @@ title IPFire (VESA) savedefault 1 title IPFire SMP (1024x768) root (hd0,0) - kernel /vmlinuz-ipfire-smp root=ROOT panic=10 acpi=off vga=791 splash=silent MOUNT + kernel /vmlinuz-ipfire-smp root=ROOT panic=10 acpi=off vga=791 MOUNT initrd /ipfirerd-smp.img savedefault 2 title IPFire SMP (VESA) @@ -25,7 +25,7 @@ title IPFire SMP (VESA) savedefault 3 title IPFire SMP-HT (Intel Pentium 4) (1024x768) root (hd0,0) - kernel /vmlinuz-ipfire-smp root=ROOT panic=10 acpi=ht vga=791 splash=silent MOUNT + kernel /vmlinuz-ipfire-smp root=ROOT panic=10 acpi=ht vga=791 MOUNT initrd /ipfirerd-smp.img savedefault 4 title IPFire SMP-HT (Intel Pentium 4) (VESA) diff --git a/config/updxlrator/download b/config/updxlrator/download index cc187f5e8d..f2af9f8e0b 100644 --- a/config/updxlrator/download +++ b/config/updxlrator/download @@ -9,9 +9,8 @@ use strict; -my $apphome="/var/ipfire/updatexlrator"; my $logfile="/var/log/updatexlrator/download.log"; -my $debug=(-e "$apphome/debug"); +my $debug = 0; my $updcachedir="/srv/web/ipfire/html/updatecache"; my $updfile=''; my @metadata=(); @@ -30,10 +29,10 @@ $updfile = substr($dsturl,rindex($dsturl,"/")+1); if ($debug) { &writelog("Retrieving file for local cache: $updfile"); - `$apphome/bin/wget -nc -nd -nv -P $updcachedir/download $dsturl >>$logfile 2>&1`; + `/usr/bin/wget -nc -nd -nv -P $updcachedir/download $dsturl >>$logfile 2>&1`; } else { - `$apphome/bin/wget -nc -nd -nv -P $updcachedir/download $dsturl 2>&1`; + `/usr/bin/wget -nc -nd -nv -P $updcachedir/download $dsturl 2>&1`; } if ($debug) { &writelog("Moving file into the cache directory -> \"$updcachedir/$updfile\""); } diff --git a/config/updxlrator/updxlrator b/config/updxlrator/updxlrator index 4f54d429e3..839e5aa254 100644 --- a/config/updxlrator/updxlrator +++ b/config/updxlrator/updxlrator @@ -107,8 +107,26 @@ while (<>) { { $from_local_cache = &cache_access($dsturl,$hostaddr,$username,"Symantec"); } - + + # ----------------------------------------------------------- + # Section: Avira Downloads # ----------------------------------------------------------- + + if ($dsturl =~ m@^http://dl[0-9]\.avgate\.net/.*\.(htm|html|gz)$@i) + { + $from_local_cache = &cache_access($dsturl,$hostaddr,$username,"Avira"); + } + + # ----------------------------------------------------------- + # Section: Avast Downloads + # ----------------------------------------------------------- + + if ($dsturl =~ m@^http://download[0-99]\.avast\.com/.*\.(exe|zip|vps|stamp|vpu)$@i) + { + $from_local_cache = &cache_access($dsturl,$hostaddr,$username,"Avast"); + } + + # ----------------------------------------------------------- } diff --git a/doc/language_issues.de b/doc/language_issues.de index 9487471b40..1ab1f1fa6a 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -389,3 +389,6 @@ WARNING: translation string unused: xtaccess bad transfert WARNING: translation string unused: year WARNING: translation string unused: yearly firewallhits WARNING: untranslated string: OVPN +WARNING: untranslated string: abort +WARNING: untranslated string: aktiv +WARNING: untranslated string: reload diff --git a/doc/language_issues.en b/doc/language_issues.en index de7c39f0d6..98784d620c 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -392,3 +392,6 @@ WARNING: translation string unused: written sectors WARNING: translation string unused: year WARNING: translation string unused: yearly firewallhits WARNING: untranslated string: OVPN +WARNING: untranslated string: abort +WARNING: untranslated string: aktiv +WARNING: untranslated string: reload diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 9aa37ed855..5a2ef9b527 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -62,7 +62,7 @@ my %sections = ( 'ssh' => '(sshd(?:\(.*\))?\[.*\])', 'auth' => '(\w+\(pam_unix\)\[.*\])', 'kernel' => '(kernel)', - 'ipsec' => '(ipsec_[\w_]+|pluto\[.*\])', + 'ipsec' => '(ipsec_[\w_]+|pluto\[.*\]|vpnwatch)', 'snort' => '(snort)', 'openvpn' => '(openvpnserver)\[.*\]' ); diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 2c0d7dc0dc..ccde0298c3 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -6,9 +6,6 @@ # # 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; @@ -24,8 +21,6 @@ require "/opt/pakfire/lib/functions.pl"; my %pakfiresettings=(); my $errormessage = ''; -my @instlist = `ls /opt/pakfire/cache`; -my $uninstall = 'yes'; &Header::showhttpheaders(); @@ -42,20 +37,53 @@ $pakfiresettings{'AUTOUPDATE'} = ''; &Header::openbigbox('100%', 'left', '', $errormessage); if ($pakfiresettings{'ACTION'} eq 'install'){ -print "Going to install $pakfiresettings{'INSPAKS'}"; -system("/opt/pakfire/pakfire installi $pakfiresettings{'INSPAKS'}") -}elsif ($pakfiresettings{'ACTION'} eq 'remove'){ -foreach (@instlist){ -my @pakname = split(/-/,$_); -my $dependency = `grep "Dependencies.*$pakfiresettings{'DELPAKS'}" /opt/pakfire/db/meta/*$pakname[0]`; -if ($dependency){$errormessage = "We have depending Paket $pakname[0] nothing will be done.
";$uninstall='no';last;}else{$uninstall='yes';} -} -if ($uninstall eq 'yes'){ -print "Going to uninstall $pakfiresettings{'DELPAKS'}"; -system("/opt/pakfire/pakfire uninstalli $pakfiresettings{'DELPAKS'}") -} -} elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") -{ + if ("$pakfiresettings{'FORCE'}" eq "on") { + system("/usr/local/bin/pakfire", "install", "--non-interactive", "$pakfiresettings{'INSPAKS'}", "&"); + sleep(1); + } else { + &Header::openbox("100%", "center", "Abfrage"); + my @output = `/usr/local/bin/pakfire resolvedeps $pakfiresettings{'INSPAKS'}`; + print <Sie maechten folgende Pakete installieren: $pakfiresettings{'INSPAKS'}. Moeglicherweise haben diese Pakete Abhaengigkeiten, d.h. andere Pakete muessen zusaetzlich installiert werden. Dazu sehen sie unten eine Liste. +
		
+END
+		foreach (@output) {
+			print "$_\n";
+		}
+		print <
+		Moechten Sie der Installation aller Pakete zustimmen?
+		 
+		
+ + + + +
+ +
+ + +
+ +END + &Header::closebox(); + &Header::closebigbox(); + &Header::closepage(); + exit; + } +} elsif ($pakfiresettings{'ACTION'} eq 'remove') { + +} elsif ($pakfiresettings{'ACTION'} eq 'update') { + + system("/usr/local/bin/pakfire update --force"); + +} elsif ($pakfiresettings{'ACTION'} eq 'unlock') { + + &Pakfire::lock("off"); + +} elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") { + &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); } @@ -73,7 +101,30 @@ if ($errormessage) { &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); print "$errormessage \n"; &Header::closebox(); - } +} + +if ( -e "/opt/pakfire/pakfire.lock" ) { + &Header::openbox("100%", "center", "Aktiv"); + print < + +
+ +   +
+ + Pakfire fuehrt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde. + +
+ +
+ +END + &Header::closebox(); + &Header::closebigbox(); + &Header::closepage(); + exit; +} &Header::openbox("100%", "center", "Pakfire"); @@ -94,6 +145,7 @@ print <
+
@@ -104,11 +156,10 @@ print <Installierte Addons: