mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
7da8f8d81b
'zfs load-key -a' will only be called if needed. If a dataset not needed for boot does not have its key loaded (home directories for example) boot can still continue. zfs:AUTO was not working via dracut, so we still need the generator script to do its thing. Reviewed-by: Richard Yao <ryao@gentoo.org> Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Matthew Thode <mthode@mthode.org> Closes #6982 Closes #7004
20 lines
552 B
SYSTEMD
20 lines
552 B
SYSTEMD
[Unit]
|
|
Description=Import ZFS pools by device scanning
|
|
Documentation=man:zpool(8)
|
|
DefaultDependencies=no
|
|
Requires=systemd-udev-settle.service
|
|
After=systemd-udev-settle.service
|
|
After=cryptsetup.target
|
|
Before=zfs-import.target
|
|
ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStartPre=/sbin/modprobe zfs
|
|
ExecStart=@sbindir@/zpool import -aN -o cachefile=none
|
|
ExecStartPost=/bin/bash -c "/usr/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs)"
|
|
|
|
[Install]
|
|
WantedBy=zfs-import.target
|