diff options
-rw-r--r-- | etc/systemd/system/Makefile.am | 8 | ||||
-rw-r--r-- | etc/systemd/system/zed.service.in | 13 | ||||
-rw-r--r-- | etc/systemd/system/zfs.target.in | 1 |
3 files changed, 20 insertions, 2 deletions
diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am index 31521cecc..b7a8db243 100644 --- a/etc/systemd/system/Makefile.am +++ b/etc/systemd/system/Makefile.am @@ -1,15 +1,17 @@ systemdpreset_DATA = \ $(top_srcdir)/etc/systemd/system/50-zfs.preset systemdunit_DATA = \ - $(top_srcdir)/etc/systemd/system/zfs-import-scan.service \ + $(top_srcdir)/etc/systemd/system/zed.service \ $(top_srcdir)/etc/systemd/system/zfs-import-cache.service \ + $(top_srcdir)/etc/systemd/system/zfs-import-scan.service \ $(top_srcdir)/etc/systemd/system/zfs-mount.service \ $(top_srcdir)/etc/systemd/system/zfs-share.service \ $(top_srcdir)/etc/systemd/system/zfs.target EXTRA_DIST = \ - $(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \ + $(top_srcdir)/etc/systemd/system/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 \ $(top_srcdir)/etc/systemd/system/zfs-share.service.in \ $(top_srcdir)/etc/systemd/system/zfs.target.in \ @@ -17,12 +19,14 @@ EXTRA_DIST = \ $(systemdunit_DATA): -$(SED) -e 's,@bindir\@,$(bindir),g' \ + -e 's,@runstatedir\@,$(runstatedir),g' \ -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ '[email protected]' >'$@' $(systemdpreset_DATA): -$(SED) -e 's,@bindir\@,$(bindir),g' \ + -e 's,@runstatedir\@,$(runstatedir),g' \ -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ '[email protected]' >'$@' diff --git a/etc/systemd/system/zed.service.in b/etc/systemd/system/zed.service.in new file mode 100644 index 000000000..78988abb9 --- /dev/null +++ b/etc/systemd/system/zed.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=ZFS Event Daemon (zed) +Documentation=man:zed(8) +After=zfs-import-cache.service +After=zfs-import-scan.service + +[Service] +Type=forking +ExecStart=@sbindir@/zed +PIDFile=@runstatedir@/zed.pid +User=root +Group=root +Restart=on-abort diff --git a/etc/systemd/system/zfs.target.in b/etc/systemd/system/zfs.target.in index 7d464873b..354153385 100644 --- a/etc/systemd/system/zfs.target.in +++ b/etc/systemd/system/zfs.target.in @@ -2,6 +2,7 @@ Description=ZFS startup target Requires=zfs-mount.service Requires=zfs-share.service +Wants=zed.service [Install] WantedBy=multi-user.target |