diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 3697f09c7f..47c5b07f8f 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -9,11 +9,11 @@ After=multipathd.target After=systemd-remount-fs.service Before=zfs-import.target ConditionPathExists=@sysconfdir@/zfs/zpool.cache +ConditionPathIsDirectory=/sys/module/zfs [Service] Type=oneshot RemainAfterExit=yes -ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN [Install] diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 1a352a8acb..6520f32463 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -8,11 +8,11 @@ After=cryptsetup.target After=multipathd.target Before=zfs-import.target ConditionPathExists=!@sysconfdir@/zfs/zpool.cache +ConditionPathIsDirectory=/sys/module/zfs [Service] Type=oneshot RemainAfterExit=yes -ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules ExecStart=@sbindir@/zpool import -aN -o cachefile=none [Install] diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in index e0d4bb37f6..480f39a497 100644 --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in @@ -7,11 +7,11 @@ After=zfs-import.target After=systemd-remount-fs.service Before=local-fs.target Before=systemd-random-seed.service +ConditionPathIsDirectory=/sys/module/zfs [Service] Type=oneshot RemainAfterExit=yes -ExecCondition=/usr/bin/grep -q "^zfs " /proc/modules ExecStart=@sbindir@/zfs mount -a [Install]