xref: /freebsd/sys/contrib/openzfs/contrib/dracut/90zfs/zfs-env-bootfs.service.in (revision c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5)
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 -v '^-$')"
12
13[Install]
14WantedBy=zfs-import.target
15