From 8f90f7372a1b456ec6ede5e5464ffa23273a7a99 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Wed, 23 Sep 2015 23:04:17 +0200 Subject: [PATCH] Rename 'zed.service' to 'zfs-zed.service' For consistency all systemd unit files and init scripts now share the same names. This prevents an issue where the zed is started twice on systems where both the systemd and sysv infrastructure is installed concurrently. For backward compatibility a 'zed' alias has been added. This allows the user to interact with the service using either the name 'zed' or 'zfs-zed'. Signed-off-by: Turbo Fredriksson Signed-off-by: Brian Behlendorf Issue #3837 --- etc/systemd/system/Makefile.am | 4 ++-- etc/systemd/system/{zed.service.in => zfs-zed.service.in} | 3 +++ etc/systemd/system/zfs.target.in | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) rename etc/systemd/system/{zed.service.in => zfs-zed.service.in} (86%) diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am index 82aedd1ea080..f7023dff0709 100644 --- a/etc/systemd/system/Makefile.am +++ b/etc/systemd/system/Makefile.am @@ -2,7 +2,7 @@ systemdpreset_DATA = \ 50-zfs.preset systemdunit_DATA = \ - zed.service \ + zfs-zed.service \ zfs-import-cache.service \ zfs-import-scan.service \ zfs-mount.service \ @@ -10,7 +10,7 @@ systemdunit_DATA = \ zfs.target EXTRA_DIST = \ - $(top_srcdir)/etc/systemd/system/zed.service.in \ + $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \ $(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \ $(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \ $(top_srcdir)/etc/systemd/system/zfs-mount.service.in \ diff --git a/etc/systemd/system/zed.service.in b/etc/systemd/system/zfs-zed.service.in similarity index 86% rename from etc/systemd/system/zed.service.in rename to etc/systemd/system/zfs-zed.service.in index 5b23630923e1..4d4c9d841323 100644 --- a/etc/systemd/system/zed.service.in +++ b/etc/systemd/system/zfs-zed.service.in @@ -7,3 +7,6 @@ After=zfs-import-scan.service [Service] ExecStart=@sbindir@/zed -F Restart=on-abort + +[Install] +Alias=zed.service diff --git a/etc/systemd/system/zfs.target.in b/etc/systemd/system/zfs.target.in index 35415338560a..ce110e573bac 100644 --- a/etc/systemd/system/zfs.target.in +++ b/etc/systemd/system/zfs.target.in @@ -2,7 +2,7 @@ Description=ZFS startup target Requires=zfs-mount.service Requires=zfs-share.service -Wants=zed.service +Wants=zfs-zed.service [Install] WantedBy=multi-user.target