]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Add systemd unit file for zed
authorChris Dunlap <cdunlap@llnl.gov>
Tue, 11 Mar 2014 19:33:32 +0000 (12:33 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 Apr 2014 20:10:08 +0000 (13:10 -0700)
This commit adds a systemd unit file for zed.service and integrates
it into the zfs.target from commit 881f45c.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2108
Issue #2

etc/systemd/system/Makefile.am
etc/systemd/system/zed.service.in [new file with mode: 0644]
etc/systemd/system/zfs.target.in

index 31521ceccb5893a3dc4296cc2e52555b3df7298e..b7a8db2435c3763b153145597c891291de5a5448 100644 (file)
@@ -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' \
                '$@.in' >'$@'
 
 $(systemdpreset_DATA):
        -$(SED) -e 's,@bindir\@,$(bindir),g' \
+               -e 's,@runstatedir\@,$(runstatedir),g' \
                -e 's,@sbindir\@,$(sbindir),g' \
                -e 's,@sysconfdir\@,$(sysconfdir),g' \
                '$@.in' >'$@'
diff --git a/etc/systemd/system/zed.service.in b/etc/systemd/system/zed.service.in
new file mode 100644 (file)
index 0000000..78988ab
--- /dev/null
@@ -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
index 7d464873b7cccb7ba1760cfcf3414c3cd008ba02..35415338560a87122f5a2facc161b386c63e0bf3 100644 (file)
@@ -2,6 +2,7 @@
 Description=ZFS startup target
 Requires=zfs-mount.service
 Requires=zfs-share.service
+Wants=zed.service
 
 [Install]
 WantedBy=multi-user.target