]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
pakfire.cgi: Notify user if Pakfire is already performing a task
authorLeo-Andres Hofmann <hofmann@leo-andres.de>
Sun, 8 May 2022 12:09:49 +0000 (14:09 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Sun, 8 May 2022 13:13:21 +0000 (13:13 +0000)
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
html/cgi-bin/pakfire.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index daa82e34c165e068674b3061e3ca7a166e0ca2cc..ec3ee2cc64c7cc8988c6dcecad331c60a840a4cc 100644 (file)
@@ -96,8 +96,10 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') {
 }
 
 ### Process Pakfire install/update commands ###
-if(($cgiparams{'ACTION'} ne '') && (! &_is_pakfire_busy())) {
-       if(($cgiparams{'ACTION'} eq 'install') && ($cgiparams{'FORCE'} eq 'on')) {
+if($cgiparams{'ACTION'} ne '') {
+       if(&_is_pakfire_busy()) {
+               $errormessage = $Lang::tr{'pakfire already busy'};
+       } elsif(($cgiparams{'ACTION'} eq 'install') && ($cgiparams{'FORCE'} eq 'on')) {
                my @pkgs = split(/\|/, $cgiparams{'INSPAKS'});
                &General::system_background("/usr/local/bin/pakfire", "install", "--non-interactive", "--no-colors", @pkgs);
        } elsif(($cgiparams{'ACTION'} eq 'remove') && ($cgiparams{'FORCE'} eq 'on')) {
index a841b39f92337d862ba0cfc85358d7168e70cfe0..7a39e233b415e4f8100e705812de2e0637cb1610 100644 (file)
 'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.',
 'pakfire accept all' => 'Möchten Sie der Installation aller Pakete zustimmen?',
 'pakfire ago' => 'her.',
+'pakfire already busy' => 'Pakfire führt bereits eine Aufgabe aus. Bitte versuchen Sie es später erneut.',
 'pakfire available addons' => 'Verfügbare Addons:',
 'pakfire configuration' => 'Pakfire Konfiguration',
 'pakfire core update auto' => 'Core- und Addon-Updates automatisch installieren:',
index e30ee4f696e366fae9ae14361be91df93c2d7639..f90e3103bca21b1d734fb174aa0eebc2b7b86453 100644 (file)
 'pagerefresh' => 'Page is beeing refreshed, please wait.',
 'pakfire accept all' => 'Do you want to install all packages?',
 'pakfire ago' => 'ago.',
+'pakfire already busy' => 'Pakfire is already performing a task. Please try again later.',
 'pakfire available addons' => 'Available Addons:',
 'pakfire configuration' => 'Pakfire Configuration',
 'pakfire core update auto' => 'Install core and addon updates automatically:',