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