Skip to content

Commit

Permalink
Cleanup systemd dependencies
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
Closes #6822
  • Loading branch information
aerusso authored and behlendorf committed Nov 8, 2017
1 parent 011ef12 commit 80b4852
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions etc/systemd/system/50-zfs.preset.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion etc/systemd/system/zfs-import-cache.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion etc/systemd/system/zfs-import-scan.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion etc/systemd/system/zfs-import.target.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=ZFS pool import target
Before=dracut-mount.service

[Install]
WantedBy=zfs-mount.service
WantedBy=zfs.target
1 change: 0 additions & 1 deletion etc/systemd/system/zfs-mount.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ RemainAfterExit=yes
ExecStart=@sbindir@/zfs mount -a

[Install]
WantedBy=zfs-share.service
WantedBy=zfs.target
2 changes: 1 addition & 1 deletion etc/systemd/system/zfs-share.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions etc/systemd/system/zfs-zed.service.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 80b4852

Please sign in to comment.