mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-11 09:04:01 +03:00
boot/init: Kill splash after 10 seconds without it exiting
This commit is contained in:
parent
ba3ee779d0
commit
badf9239e7
@ -29,6 +29,8 @@ class Tasks::Splash < SingletonTask
|
||||
# Implementation details-y; ask for the splash applet to be exited.
|
||||
def quit(reason, sticky: nil)
|
||||
return if @pid.nil?
|
||||
|
||||
count = 0
|
||||
# Ensures the progress is shown
|
||||
Progress.update({progress: 100, label: reason})
|
||||
|
||||
@ -45,6 +47,12 @@ class Tasks::Splash < SingletonTask
|
||||
|
||||
# Leave some breathing room to the CPU!
|
||||
sleep(0.1)
|
||||
count += 1
|
||||
if count > 60 # 10 seconds~ish
|
||||
$logger.fatal("Splash applet would not quit by itself...")
|
||||
kill
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
@pid = nil
|
||||
|
Loading…
Reference in New Issue
Block a user