diff options
author | Matthew Thode <[email protected]> | 2018-01-18 18:20:34 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-01-18 10:20:34 -0800 |
commit | 7da8f8d81bf1fadc2d9dff10f0435fe601e919fa (patch) | |
tree | c7cfb694f5a0fbf8a9645863476d1445d0ebdbb0 /etc | |
parent | 79c3270476b7140220c7946dd0a709a31bb9ed1b (diff) |
Run zfs load-key if needed in dracut
'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 <[email protected]>
Reviewed-by: Manuel Amador (Rudd-O) <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Matthew Thode <[email protected]>
Closes #6982
Closes #7004
Diffstat (limited to 'etc')
-rw-r--r-- | etc/systemd/system/zfs-import-cache.service.in | 1 | ||||
-rw-r--r-- | etc/systemd/system/zfs-import-scan.service.in | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index b37f2bc7f..3665b1eb4 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -14,6 +14,7 @@ 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 diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 213a3beaf..0a5951f4c 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -13,6 +13,7 @@ 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 |