mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-28 20:09:35 +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
21 lines
593 B
SYSTEMD
21 lines
593 B
SYSTEMD
[Unit]
|
|
Description=Import ZFS pools by cache file
|
|
Documentation=man:zpool(8)
|
|
DefaultDependencies=no
|
|
Requires=systemd-udev-settle.service
|
|
After=systemd-udev-settle.service
|
|
After=cryptsetup.target
|
|
After=systemd-remount-fs.service
|
|
Before=zfs-import.target
|
|
ConditionPathExists=@sysconfdir@/zfs/zpool.cache
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStartPre=/sbin/modprobe zfs
|
|
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
|
|
ExecStartPost=/bin/bash -c "/usr/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs)"
|
|
|
|
[Install]
|
|
WantedBy=zfs-import.target
|