Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process all systemd services through the systemd scriptlets #5356

Merged
merged 1 commit into from
Nov 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -265,7 +266,7 @@ exit 0

%postun
%if 0%{?_systemd}
%systemd_postun zfs.target
%systemd_postun %{systemd_svcs}
%endif

%files
Expand Down