xref: /freebsd/sys/contrib/openzfs/contrib/dracut/90zfs/zfs-env-bootfs.service.in (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
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