X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fpakfire.cgi;h=167f48f738487c3406fa1655e93efc5328c4aee5;hb=5595bc0381fe971b538ddd0b7cf3bf4a9f31832c;hp=21160620d4d4daa09ec3eaf1a2347ba0d6d18fb3;hpb=c5d106c11c617631543aa42196287e0d41aa3299;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 21160620d4..167f48f738 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -46,7 +46,10 @@ $pakfiresettings{'AUTOUPDATE'} = 'off'; $pakfiresettings{'AUTOUPGRADE'} = 'off'; $pakfiresettings{'UUID'} = 'on'; +sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "
+END foreach (@output) { + $_ =~ s/\\[[0-1]\;[0-9]+m//g; print "$_\n"; } print <$Lang::tr{'pakfire uninstall package'}.$pakfiresettings{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'} - +END foreach (@output) { + $_ =~ s/\\[[0-1]\;[0-9]+m//g; print "$_\n"; } print </dev/null"); } elsif ($pakfiresettings{'ACTION'} eq 'upgrade') { - + system("/usr/local/bin/pakfire upgrade -y --no-colors &>/dev/null"); - + refreshpage(); + } elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") { - if ($pakfiresettings{'AUTOUPDATE'} == "on") { - system("/usr/local/bin/pakfire enable updates"); + if ($pakfiresettings{'AUTOUPDATE'} eq 'on') { + system("/usr/local/bin/pakfire enable updates >/dev/null 2>&1"); } else { - system("/usr/local/bin/pakfire disable updates"); + system("/usr/local/bin/pakfire disable updates >/dev/null 2>&1"); } - - if ($pakfiresettings{'AUTOUPGRADE'} == "on") { - system("/usr/local/bin/pakfire enable upgrades"); + + if ($pakfiresettings{'AUTOUPGRADE'} eq 'on') { + system("/usr/local/bin/pakfire enable upgrades >/dev/null 2>&1"); } else { - system("/usr/local/bin/pakfire disable upgrades"); + system("/usr/local/bin/pakfire disable upgrades >/dev/null 2>&1"); } &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); @@ -208,7 +214,7 @@ END exit; } -my $core_release = `cat /opt/pakfire/db/core/mine`; +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"); @@ -218,7 +224,7 @@ my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db" &Header::openbox("100%", "center", "Pakfire"); print < +
$Lang::tr{'pakfire system state'}: $Lang::tr{'pakfire core update level'}: $core_release
@@ -241,17 +247,17 @@ END - +$Lang::tr{'pakfire available addons'} $Lang::tr{'pakfire installed addons'} - ($Lang::tr{'pakfire install description'}
-