X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fpakfire.cgi;h=99f28baa7693fdaf538d95e5f605cd05433d72e9;hp=d62be482f4335f67163e78c71baaf750485ea693;hb=377560fbff99600f9260764b8c16e8a02821ea3a;hpb=8a8a50ad09fa96292c21f5096c6b617f38e3791d diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index d62be482f4..99f28baa76 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -32,10 +32,9 @@ $pakfiresettings{'VALID'} = ''; $pakfiresettings{'INSPAKS'} = ''; $pakfiresettings{'DELPAKS'} = ''; $pakfiresettings{'AUTOUPDATE'} = 'off'; +$pakfiresettings{'AUTOUPGRADE'} = 'off'; $pakfiresettings{'UUID'} = 'on'; -system("/usr/local/bin/pakfire update >/dev/null") if not -e "/opt/pakfire/db/lists/packages_list.db"; - &Header::getcgihash(\%pakfiresettings); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); @@ -123,16 +122,27 @@ END } elsif ($pakfiresettings{'ACTION'} eq 'update') { - system("/usr/local/bin/pakfire update --force --no-colors"); + system("/usr/local/bin/pakfire update --force --no-colors &>/dev/null"); } elsif ($pakfiresettings{'ACTION'} eq 'upgrade') { - system("/usr/local/bin/pakfire upgrade -y --no-colors"); + system("/usr/local/bin/pakfire upgrade -y --no-colors &>/dev/null"); } elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") { - &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); + if ($pakfiresettings{'AUTOUPDATE'} == "on") { + system("/usr/local/bin/pakfire enable updates"); + } else { + system("/usr/local/bin/pakfire disable updates"); + } + + if ($pakfiresettings{'AUTOUPGRADE'} == "on") { + system("/usr/local/bin/pakfire enable upgrades"); + } else { + system("/usr/local/bin/pakfire disable upgrades"); + } + &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); } &General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings); @@ -143,6 +153,9 @@ my %checked=(); $checked{'AUTOUPDATE'}{'off'} = ''; $checked{'AUTOUPDATE'}{'on'} = ''; $checked{'AUTOUPDATE'}{$pakfiresettings{'AUTOUPDATE'}} = "checked='checked'"; +$checked{'AUTOUPGRADE'}{'off'} = ''; +$checked{'AUTOUPGRADE'}{'on'} = ''; +$checked{'AUTOUPGRADE'}{$pakfiresettings{'AUTOUPGRADE'}} = "checked='checked'"; $checked{'UUID'}{'off'} = ''; $checked{'UUID'}{'on'} = ''; $checked{'UUID'}{$pakfiresettings{'UUID'}} = "checked='checked'"; @@ -184,66 +197,88 @@ END exit; } +my $core_release = `cat /opt/pakfire/db/core/mine`; +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"); + &Header::openbox("100%", "center", "Pakfire"); print < - $Lang::tr{'pakfire available addons'}$Lang::tr{'pakfire installed addons'} - -
+ + - -
(TR) Your system's state: + +
(TR) Core-Update-Level: $core_release
+ (TR) Last Update made $core_update_age ago
+ (TR) Last server list update made $server_update_age ago
+ (TR) Last core list update made $corelist_update_age ago
+ (TR) Last packages list update made $packages_update_age ago + + +
+ +
+
+ + +
+ +
  +
$Lang::tr{'pakfire available addons'} + $Lang::tr{'pakfire installed addons'} +
+

(TR) Please choose one or more items from the list below and click the 'plus' to install.

+
+
-
- -
- -
- -
- - -
+ + +

(TR) Please choose one or more items from the list below and click the 'minus' to uninstall.

+
-
-
- -
$Lang::tr{'pakfire updates'}
-
  - +
+ + + +
END - &Pakfire::dblist("upgrade", "forweb"); +&Header::closebox(); +&Header::openbox("100%", "center", "$Lang::tr{'settings'}"); print < - - - -
-
$Lang::tr{'basic options'}
+
$Lang::tr{'basic options'}
$Lang::tr{'pakfire update daily'} $Lang::tr{'pakfire register'} +
(TR) Apply core updates automatically? + +