From: Stefan Schantl Date: Mon, 24 May 2021 17:38:21 +0000 (+0200) Subject: pakfire.cgi: Check for locked pakfire before trying to perform operations. X-Git-Tag: v2.25-core158~33^2~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d702bce20b740b53d4743f777ab75f135267819d;p=ipfire-2.x.git pakfire.cgi: Check for locked pakfire before trying to perform operations. Fixes #12621. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index a9e12d23c1..faaeb4222c 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -54,7 +54,7 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "/dev/null &"); system("/bin/sleep 1"); -} elsif ($cgiparams{'ACTION'} eq 'upgrade') { +} elsif (($cgiparams{'ACTION'} eq 'upgrade') && (!-e $Pakfire::lockfile)) { my $command = "/usr/local/bin/pakfire upgrade -y --no-colors &>/dev/null &"; system("$command"); system("/bin/sleep 1"); @@ -176,9 +176,7 @@ if ($errormessage) { &Header::closebox(); } -my $return = `pidof pakfire`; -chomp($return); -if ($return) { +if (-e $Pakfire::lockfile) { &Header::openbox( 'Waiting', 1, "" ); print <