mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2025-12-20 04:30:10 +01:00
systemd: Add mkinitcpio support to plymouth-switch-root-initramfs.service
plymouth-switch-root-initramfs.service commands plymouth to release rootfs to allow the shutdown ramfs to unmount rootfs. However, it only integrates with dracut. Arch Linux uses mkinitcpio by default, and it uses shutdown ramfs when layered block storage (e.g. LUKS) is used for rootfs. Therefore, it fails to unmount rootfs on shutdown if LUKS and plymouth are used together. Add a new trigger for plymouth-switch-root-initramfs.service to start when /run/initramfs/shutdown exists (/run/initramfs/bin/sh may not exist with mkinitcpio when systemd-based initramfs is used), and add a dependency to start it after mkinitcpio generates the shutdown ramfs.
This commit is contained in:
parent
c09c651afe
commit
2f12aa4c5d
1 changed files with 3 additions and 2 deletions
|
|
@ -4,8 +4,9 @@ DefaultDependencies=no
|
|||
# dracut-shutdown.service restores the initramfs when it is _stopped_
|
||||
# use Conflicts to make sure its ExecStop has run before we do
|
||||
Conflicts=dracut-shutdown.service
|
||||
After=plymouth-halt.service plymouth-reboot.service plymouth-poweroff.service plymouth-kexec.service dracut-shutdown.service
|
||||
ConditionPathExists=/run/initramfs/bin/sh
|
||||
After=plymouth-halt.service plymouth-reboot.service plymouth-poweroff.service plymouth-kexec.service dracut-shutdown.service mkinitcpio-generate-shutdown-ramfs.service
|
||||
ConditionPathExists=|/run/initramfs/bin/sh
|
||||
ConditionPathExists=|/run/initramfs/shutdown
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue