When plymouth receives SIGTERM during shutdown or reboot, we must
exit cleanly to avoid keeping files open on the rootfs and to avoid
making drmModeSetCrtc () calls after the kms driver's shutdown method
has ran.
But at the same time we also want the boot-splash to stay up (in its
idle form) until the system actually reboots or powers off.
So we want to avoid the boot-splash getting replaced by e.g.
the text-console.
Add a plymouthd-fd-escrow helper which will get forked off when we
receive a SIGTERM in reboot/shutdown mode with pixel-displays active.
This helper will keep the fds for the pixel-displays open, so that
the boot-splash stays up until the end.
Changes by Hans de Goede:
- Start the escrow helper from main.c instead of from the drm plugin
- Rename the helper from plymouthd-drm-escrow to plymouthd-fd-escrow, since it
will be used to escrow fbdev fd-s too now
- In the child of the fork, continue with quiting normally (letting the
bootsplash become idle) instead of exiting directly
- Make plymouthd-fd-escrow a normal dynamic binary instead of a static binary,
the initrd already contains dynamic binaries so it does not have to be static
- Split the changes adding plymouth-switch-root-initramfs.service into a
separate patch
- Rewrite commit message
Signed-off-by: Hans de Goede <hdegoede@redhat.com>