zfs-builds-mm/zfs-0.8.4/contrib/dracut/90zfs/zfs-env-bootfs.service.in

15 lines
369 B
SYSTEMD
Raw Normal View History

2020-07-19 16:21:53 +02:00
[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