summaryrefslogtreecommitdiff
path: root/spec/iprutils.spec
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>2015-09-10 13:18:47 -0300
committerBrian King <brking@linux.vnet.ibm.com>2015-09-16 16:35:36 -0500
commit372b41f860bd2ca51cb768891a4238215bdc225f (patch)
tree345dd92d3492d51876ff8d60d4e6e9a791b09d36 /spec/iprutils.spec
parent47581b3c91ad8f13d611853667c5b94cbcf7642e (diff)
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 <krisman@linux.vnet.ibm.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Diffstat (limited to 'spec/iprutils.spec')
-rw-r--r--spec/iprutils.spec24
1 files changed, 24 insertions, 0 deletions
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
##