rpm: use proper macros for systemd handling
This commit is contained in:
parent
4157f919b6
commit
89776c7f18
@ -16,6 +16,8 @@ Requires: python34-qubesimgconverter
|
|||||||
%else
|
%else
|
||||||
Requires: python3-qubesimgconverter
|
Requires: python3-qubesimgconverter
|
||||||
%endif
|
%endif
|
||||||
|
%{?systemd_requires}
|
||||||
|
BuildRequires: systemd
|
||||||
BuildRequires: qubes-libvchan-devel
|
BuildRequires: qubes-libvchan-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
@ -96,15 +98,17 @@ rm -rf imgconverter/build
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
# dom0
|
# dom0
|
||||||
/bin/systemctl enable qubes-meminfo-writer-dom0.service > /dev/null 2>&1
|
%systemd_post qubes-meminfo-writer-dom0.service
|
||||||
# VM
|
# VM
|
||||||
/bin/systemctl enable qubes-meminfo-writer.service > /dev/null 2>&1
|
%systemd_post qubes-meminfo-writer.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun qubes-meminfo-writer-dom0.service
|
||||||
|
%systemd_preun qubes-meminfo-writer.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 -eq 0 ]; then
|
%systemd_postun_with_restart qubes-meminfo-writer-dom0.service
|
||||||
/bin/systemctl disable qubes-meminfo-writer.service > /dev/null 2>&1
|
%systemd_postun_with_restart qubes-meminfo-writer.service
|
||||||
/bin/systemctl disable qubes-meminfo-writer.service > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user