From 372b41f860bd2ca51cb768891a4238215bdc225f Mon Sep 17 00:00:00 2001 From: Gabriel Krisman Bertazi Date: Thu, 10 Sep 2015 13:18:47 -0300 Subject: iprutils; Fix some defaults for powerkvm packaging. Yet another patch to the spec file. This time we add some defaults for PowerKVM that was missing in my last patch. It fixes some issues we were having with daemons in this distro. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Brian King --- spec/iprutils.spec | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'spec/iprutils.spec') diff --git a/spec/iprutils.spec b/spec/iprutils.spec index e4ecfc4..e12af97 100644 --- a/spec/iprutils.spec +++ b/spec/iprutils.spec @@ -51,6 +51,10 @@ Requires: python %endif # RHEL +%if "%{?dist}" == "pkvm3_1" +BuildRequires: systemd +%endif + # # Compilation parameters. %{?rhel:%define WITH_SOSREPORT 1} @@ -147,6 +151,14 @@ Static version of some tools of iprutils. %endif %endif #RHEL +%if "%{?dist}" == "pkvm3_1" +# FIXME: We should be able to use systemd_post macro here, but ipr is +# not in the preset list for pkvm. +/usr/bin/systemctl enable iprinit.service 2>&1 1>/dev/null +/usr/bin/systemctl enable iprupdate.service 2>&1 1>/dev/null +/usr/bin/systemctl enable iprdump.service 2>&1 1>/dev/null +%endif + # Start daemons. %if 0%{?_unitdir:1}%{!?_unitdir:0} /usr/bin/systemctl start iprinit.service || : @@ -205,6 +217,12 @@ fi %endif # RHEL +%if "%{?dist}" == "pkvm3_1" +%systemd_preun iprinit.service +%systemd_preun iprupdate.service +%systemd_preun iprdump.service +%endif + ## ## postun ## @@ -249,6 +267,12 @@ fi %endif #RHEL +%if "%{?dist}" == "pkvm3_1" +%systemd_postun iprinit.service +%systemd_postun iprupdate.service +%systemd_postun iprdump.service +%endif + ## ## files ## -- cgit v1.2.3