mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
ce4432c542
Dracut depends on the environment variable BOOTFS to be set after pool import. This dracut specific systemd ExecStartPost command should not be called for any non-dracut systems, so let's move it to a static systemd unit that. Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com> Reviewed-by: Matthew Thode <prometheanfire@gentoo.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes #8510
15 lines
369 B
SYSTEMD
15 lines
369 B
SYSTEMD
[Unit]
|
|
Description=Set BOOTFS environment for dracut
|
|
Documentation=man:zpool(8)
|
|
DefaultDependencies=no
|
|
After=zfs-import-cache.service
|
|
After=zfs-import-scan.service
|
|
Before=zfs-import.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')"
|
|
|
|
[Install]
|
|
WantedBy=zfs-import.target
|