mirror_zfs/contrib/dracut/90zfs/zfs-env-bootfs.service.in

15 lines
367 B
SYSTEMD
Raw Normal View History

[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 "exec systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"
[Install]
WantedBy=zfs-import.target