summaryrefslogtreecommitdiffstats
path: root/contrib/dracut/90zfs/zfs-env-bootfs.service.in
blob: 2bc43482c1870afda30f9d251a67b59843ccfd65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 "systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')"

[Install]
WantedBy=zfs-import.target