summaryrefslogtreecommitdiffstats
path: root/contrib/dracut/90zfs/zfs-env-bootfs.service.in
blob: 3cdf69100d4bbc6569fa9c97a493fc648c2a65f0 (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 "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')"

[Install]
WantedBy=zfs-import.target