From b241bf5daf40f2cab2bf49db94d324c11be7d48d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 1 Nov 2016 15:51:16 -0400 Subject: [PATCH] Process all systemd services through the systemd scriptlets --- rpm/generic/zfs.spec.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index e80f51e312b3..6703c768be36 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -39,6 +39,7 @@ # Generic enable switch for systemd %if %{with systemd} %define _systemd 1 +%define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target %endif # RHEL >= 7 comes with systemd @@ -239,7 +240,7 @@ find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \; %post %if 0%{?_systemd} -%systemd_post zfs.target +%systemd_post %{systemd_svcs} %else if [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add zfs-import @@ -252,7 +253,7 @@ exit 0 %preun %if 0%{?_systemd} -%systemd_preun zfs.target +%systemd_preun %{systemd_svcs} %else if [ $1 -eq 0 ] && [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del zfs-import @@ -265,7 +266,7 @@ exit 0 %postun %if 0%{?_systemd} -%systemd_postun zfs.target +%systemd_postun %{systemd_svcs} %endif %files