pakfire.cgi: Notify user if Pakfire is already performing a task

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
This commit is contained in:
Leo-Andres Hofmann
2022-05-08 14:09:49 +02:00
committed by Peter Müller
parent 4b5d1f3001
commit 3cdb83939b
3 changed files with 6 additions and 2 deletions

View 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')) {

View File

@@ -1990,6 +1990,7 @@
'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:',

View File

@@ -2041,6 +2041,7 @@
'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:',