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 <kris...@linux.vnet.ibm.com>
---
 spec/iprutils.spec | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/spec/iprutils.spec b/spec/iprutils.spec
index 971d719..7a690c3 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}
@@ -143,6 +147,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 || :
@@ -201,6 +213,12 @@ fi
 
 %endif # RHEL
 
+%if "%{?dist}" == "pkvm3_1"
+%systemd_preun iprinit.service
+%systemd_preun iprupdate.service
+%systemd_preun iprdump.service
+%endif
+
 ##
 ## postun
 ##
@@ -245,6 +263,12 @@ fi
 
 %endif #RHEL
 
+%if "%{?dist}" == "pkvm3_1"
+%systemd_postun iprinit.service
+%systemd_postun iprupdate.service
+%systemd_postun iprdump.service
+%endif
+
 ##
 ## files
 ##
-- 
2.1.0


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel

Reply via email to