diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 918a258a1..17d90f638 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -3,6 +3,7 @@ Description=Import ZFS pools by cache file DefaultDependencies=no Requires=systemd-udev-settle.service After=systemd-udev-settle.service +After=cryptsetup.target ConditionPathExists=@sysconfdir@/zfs/zpool.cache [Service] diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index ab1b0f693..a93721156 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -3,6 +3,7 @@ Description=Import ZFS pools by device scanning DefaultDependencies=no Requires=systemd-udev-settle.service After=systemd-udev-settle.service +After=cryptsetup.target ConditionPathExists=!@sysconfdir@/zfs/zpool.cache [Service]