]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/pakfire.cgi
pakfire.cgi: Notify user if Pakfire is already performing a task
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
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')) {