1[Unit] 2Description=Set BOOTFS environment for dracut 3Documentation=man:zpool(8) 4DefaultDependencies=no 5After=zfs-import-cache.service 6After=zfs-import-scan.service 7Before=zfs-import.target 8 9[Service] 10Type=oneshot 11ExecStart=/bin/sh -c "exec systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)" 12 13[Install] 14WantedBy=zfs-import.target 15