mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
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:
committed by
Peter Müller
parent
4b5d1f3001
commit
3cdb83939b
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user