xref: /freebsd/sys/contrib/openzfs/contrib/dracut/90zfs/zfs-env-bootfs.service.in (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
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 "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')"
12
13[Install]
14WantedBy=zfs-import.target
15