diff options
Diffstat (limited to 'contrib/dracut/90zfs/zfs-env-bootfs.service.in')
-rw-r--r-- | contrib/dracut/90zfs/zfs-env-bootfs.service.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/dracut/90zfs/zfs-env-bootfs.service.in b/contrib/dracut/90zfs/zfs-env-bootfs.service.in new file mode 100644 index 000000000..3cdf69100 --- /dev/null +++ b/contrib/dracut/90zfs/zfs-env-bootfs.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Set BOOTFS environment for dracut +Documentation=man:zpool(8) +DefaultDependencies=no +After=zfs-import-cache.service +After=zfs-import-scan.service +Before=zfs-import.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')" + +[Install] +WantedBy=zfs-import.target |