aboutsummaryrefslogtreecommitdiffstats
path: root/etc/systemd
diff options
context:
space:
mode:
authorAntonio Russo <[email protected]>2017-11-08 12:39:15 -0500
committerBrian Behlendorf <[email protected]>2017-11-08 09:39:15 -0800
commit80b485246ab1acf5e2c5373c2739851aeb693fb4 (patch)
treed8eeefde56507c6b0bb687a3ef12415dfa5cda1d /etc/systemd
parent011ef12c7a8d10da64d477d44a361de08e2d42e9 (diff)
Cleanup systemd dependencies
Some redundancy is present in the systemd dependencies, as noticed in PR#6764. Existing setups might rely on these quirks, so these cleanups have been moved to the development branch. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #6822
Diffstat (limited to 'etc/systemd')
-rw-r--r--etc/systemd/system/50-zfs.preset.in1
-rw-r--r--etc/systemd/system/zfs-import-cache.service.in1
-rw-r--r--etc/systemd/system/zfs-import-scan.service.in1
-rw-r--r--etc/systemd/system/zfs-import.target.in2
-rw-r--r--etc/systemd/system/zfs-mount.service.in1
-rw-r--r--etc/systemd/system/zfs-share.service.in2
-rw-r--r--etc/systemd/system/zfs-zed.service.in3
7 files changed, 4 insertions, 7 deletions
diff --git a/etc/systemd/system/50-zfs.preset.in b/etc/systemd/system/50-zfs.preset.in
index 4d82778e3..884a69b5b 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 1c207f742..b37f2bc7f 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 d73b2b9dc..213a3beaf 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 ef25679ab..8d78a7a96 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 8a73716f5..a18691a46 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 d0c93a3e6..312547c26 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 e3dec3dca..317515003 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