]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commit - html/cgi-bin/pakfire.cgi
pakfire.cgi: Implement logic to lock the page until pakfire has been fully launched.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 18 Oct 2021 19:09:58 +0000 (21:09 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 19 Oct 2021 18:34:06 +0000 (18:34 +0000)
commit7f7f546e4ae25d75738d6c326149476d7def615a
tree0bec63b76816264f079f79d2222cf7126ad10d8c
parente850a61429b03cb77a9dc798e9f093500db09a87
pakfire.cgi: Implement logic to lock the page until pakfire has been fully launched.

When performing any action which requires pakfire, the page gets locked
with an message informing the user that pakfire is working. The page
will be reloaded when pakfire has been launched and is doing the
requested operation - showing the well known log output. This also
happens when pakfire has been launched via any kind of terminal or SSH
session and the CGI gets accessed.

Internally before pakfire gets started a variable called page_lock will
be set to lock the page. An while loop will keep the page locked until
pakfire is launched fully and has written it's lock_file.

This approach will prevent us from any kind of required time intervall
or race conditions.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/pakfire.cgi