diff --git a/etc/systemd/system/50-zfs.preset.in b/etc/systemd/system/50-zfs.preset.in index 4d82778e35ba..884a69b5b683 100644 --- a/etc/systemd/system/50-zfs.preset.in +++ b/etc/systemd/system/50-zfs.preset.in @@ -1,6 +1,7 @@ # ZFS is enabled by default enable zfs-import-cache.service disable zfs-import-scan.service +enable zfs-import.target enable zfs-mount.service enable zfs-share.service enable zfs-zed.service diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 1c207f7421f4..b37f2bc7f24c 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -6,7 +6,6 @@ Requires=systemd-udev-settle.service After=systemd-udev-settle.service After=cryptsetup.target After=systemd-remount-fs.service -Before=dracut-mount.service Before=zfs-import.target ConditionPathExists=@sysconfdir@/zfs/zpool.cache diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index d73b2b9dc1e3..213a3beaf910 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -5,7 +5,6 @@ DefaultDependencies=no Requires=systemd-udev-settle.service After=systemd-udev-settle.service After=cryptsetup.target -Before=dracut-mount.service Before=zfs-import.target ConditionPathExists=!@sysconfdir@/zfs/zpool.cache diff --git a/etc/systemd/system/zfs-import.target.in b/etc/systemd/system/zfs-import.target.in index ef25679ab479..8d78a7a96030 100644 --- a/etc/systemd/system/zfs-import.target.in +++ b/etc/systemd/system/zfs-import.target.in @@ -1,6 +1,6 @@ [Unit] Description=ZFS pool import target +Before=dracut-mount.service [Install] -WantedBy=zfs-mount.service WantedBy=zfs.target diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in index 8a73716f5123..a18691a4680a 100644 --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in @@ -13,5 +13,4 @@ RemainAfterExit=yes ExecStart=@sbindir@/zfs mount -a [Install] -WantedBy=zfs-share.service WantedBy=zfs.target diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in index d0c93a3e6b29..312547c262e1 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -3,7 +3,7 @@ Description=ZFS file system shares Documentation=man:zfs(8) After=nfs-server.service nfs-kernel-server.service After=smb.service -After=zfs-mount.service +Wants=zfs-mount.service PartOf=nfs-server.service nfs-kernel-server.service PartOf=smb.service diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in index e3dec3dca1b6..31751500302d 100644 --- a/etc/systemd/system/zfs-zed.service.in +++ b/etc/systemd/system/zfs-zed.service.in @@ -1,8 +1,7 @@ [Unit] Description=ZFS Event Daemon (zed) Documentation=man:zed(8) -After=zfs-import-cache.service -After=zfs-import-scan.service +After=zfs-import.target [Service] ExecStart=@sbindir@/zed -F