summaryrefslogtreecommitdiffstats
path: root/openlmi-providers.spec
diff options
context:
space:
mode:
Diffstat (limited to 'openlmi-providers.spec')
-rw-r--r--openlmi-providers.spec27
1 files changed, 27 insertions, 0 deletions
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
index 229b364..1770ca8 100644
--- a/openlmi-providers.spec
+++ b/openlmi-providers.spec
@@ -104,6 +104,9 @@ Summary: CIM provider for hardware on system
Requires: %{name}%{?_isa} = %{version}-%{release}
# For Linux_ComputerSystem
Requires: sblim-cmpi-base
+# For Hardware information
+Requires: dmidecode
+Requires: util-linux
%description -n openlmi-hardware
%{summary}.
@@ -398,6 +401,14 @@ if [ "$1" -gt 1 ]; then
> /dev/null 2>&1 || :;
fi
+%pre -n openlmi-hardware
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Hardware.mof \
+ %{_datadir}/%{name}/60_LMI_Hardware.reg \
+ > /dev/null 2>&1 || :;
+fi
+
%post -n openlmi-fan
# Register Schema and Provider
if [ "$1" -ge 1 ]; then
@@ -465,6 +476,14 @@ if [ "$1" -gt 1 ]; then
> /dev/null 2>&1 || :;
fi
+%post -n openlmi-hardware
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Hardware.mof \
+ %{_datadir}/%{name}/60_LMI_Hardware.reg \
+ > /dev/null 2>&1 || :;
+fi
+
%preun -n openlmi-fan
# Deregister only if not upgrading
if [ "$1" -eq 0 ]; then
@@ -532,6 +551,14 @@ if [ "$1" -gt 1 ]; then
> /dev/null 2>&1 || :;
fi
+%preun -n openlmi-hardware
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Hardware.mof \
+ %{_datadir}/%{name}/60_LMI_Hardware.reg \
+ > /dev/null 2>&1 || :;
+fi
+
%changelog
* Mon Jun 03 2013 Roman Rakus <rrakus@redhat.com> - 0.0.25-1
- Release 0.0.25