X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fpakfire.cgi;h=69bd11d3e23c20fc7ed3b4162bee2f7a035930d4;hb=4507b3c217634bb1cc81ae70c6098c34d44f8bbe;hp=478a490661423e68e01ae395dfb0521d9f66905b;hpb=186e3d2cf87d3277f20d8e2deeb9bde5a80f09b3;p=people%2Fpmueller%2Fipfire-2.x.git
diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi
index 478a490661..69bd11d3e2 100644
--- a/html/cgi-bin/pakfire.cgi
+++ b/html/cgi-bin/pakfire.cgi
@@ -1,18 +1,29 @@
#!/usr/bin/perl
-#
-# IPFire CGIs
-#
-# This file is part of the IPFire Project
-#
-# This code is distributed under the terms of the GPL
-#
-#
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# #
+# 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 3 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, see . #
+# #
+###############################################################################
use strict;
# enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
@@ -21,6 +32,8 @@ require "/opt/pakfire/lib/functions.pl";
my %pakfiresettings=();
my $errormessage = '';
+my %color = ();
+my %mainsettings = ();
&Header::showhttpheaders();
@@ -30,30 +43,38 @@ $pakfiresettings{'VALID'} = '';
$pakfiresettings{'INSPAKS'} = '';
$pakfiresettings{'DELPAKS'} = '';
$pakfiresettings{'AUTOUPDATE'} = 'off';
+$pakfiresettings{'AUTOUPGRADE'} = 'off';
$pakfiresettings{'UUID'} = 'on';
+sub refreshpage{&Header::openbox( 'Waiting', 1, "" );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.
-
+
$Lang::tr{'pakfire install package'}.$pakfiresettings{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'}
+
- Pakfire fuehrt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.
+ $Lang::tr{'pakfire working'}
- ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
END
-my @output = `tail /var/log/messages | grep pakfire`;
-foreach (@output) {
- print "$_";
-}
-print <
-
+ my @output = `grep pakfire /var/log/messages | tail -20`;
+ foreach (@output) {
+ print "$_";
+ }
+ print <
+
END
- ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
exit;
+ refreshpage();
}
-&Header::openbox("100%", "center", "Pakfire");
+my $core_release = `cat /opt/pakfire/db/core/mine 2>/dev/null`;
+chomp($core_release);
+my $core_update_age = &General::age("/opt/pakfire/db/core/mine");
+my $corelist_update_age = &General::age("/opt/pakfire/db/lists/core-list.db");
+my $server_update_age = &General::age("/opt/pakfire/db/lists/server-list.db");
+my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db");
-system("pakfire update &>dev/null");
+&Header::openbox("100%", "center", "Pakfire");
print <
-
Verfuegbare Addons:
+
+
$Lang::tr{'pakfire system state'}:
+
+
$Lang::tr{'pakfire core update level'}: $core_release
+ $Lang::tr{'pakfire last update'} $core_update_age ago
+ $Lang::tr{'pakfire last serverlist update'} $server_update_age ago
+ $Lang::tr{'pakfire last core list update'} $corelist_update_age ago
+ $Lang::tr{'pakfire last package update'} $packages_update_age ago
+