summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-07-29 12:39:59 +0200
committerJan Safranek <jsafrane@redhat.com>2013-07-29 12:39:59 +0200
commit3cfd78c405be425e75e78bf3d3f36016d3c4653d (patch)
tree43dfe1893e49836aa20c2aa95a461f4010ddb7a8
parent26a3dd1726be60086a878458ad706cb8ad43a1ad (diff)
downloadopenlmi-providers-3cfd78c405be425e75e78bf3d3f36016d3c4653d.tar.gz
openlmi-providers-3cfd78c405be425e75e78bf3d3f36016d3c4653d.tar.xz
openlmi-providers-3cfd78c405be425e75e78bf3d3f36016d3c4653d.zip
Fixed %post scripts to register providers on installation and %preun to uninstall them.
-rw-r--r--openlmi-providers.spec17
1 files changed, 8 insertions, 9 deletions
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
index 2bcf0c9..99f2013 100644
--- a/openlmi-providers.spec
+++ b/openlmi-providers.spec
@@ -483,7 +483,6 @@ if [ "$1" -gt 1 ]; then
> /dev/null 2>&1 || :;
fi
-
%pre -n openlmi-hardware
if [ "$1" -gt 1 ]; then
%{_bindir}/openlmi-mof-register -v %{version} unregister \
@@ -561,7 +560,7 @@ if [ "$1" -ge 1 ]; then
fi
%post -n openlmi-logicalfile
-if [ "$1" -gt 1 ]; then
+if [ "$1" -ge 1 ]; then
%{_bindir}/openlmi-mof-register -v %{version} register \
%{_datadir}/%{name}/60_LMI_LogicalFile.mof \
%{_datadir}/%{name}/60_LMI_LogicalFile.reg \
@@ -572,7 +571,7 @@ if [ "$1" -gt 1 ]; then
fi
%post -n openlmi-realmd
-if [ "$1" -gt 1 ]; then
+if [ "$1" -ge 1 ]; then
%{_bindir}/openlmi-mof-register -v %{version} register \
%{_datadir}/%{name}/60_LMI_Realmd.mof \
%{_datadir}/%{name}/60_LMI_Realmd.reg \
@@ -583,7 +582,7 @@ if [ "$1" -gt 1 ]; then
fi
%post -n openlmi-hardware
-if [ "$1" -gt 1 ]; then
+if [ "$1" -ge 1 ]; then
%{_bindir}/openlmi-mof-register -v %{version} register \
%{_datadir}/%{name}/60_LMI_Hardware.mof \
%{_datadir}/%{name}/60_LMI_Hardware.reg \
@@ -591,7 +590,7 @@ if [ "$1" -gt 1 ]; then
fi
%post -n openlmi-pcp
-if [ "$1" -gt 1 ]; then
+if [ "$1" -ge 1 ]; then
%{_bindir}/openlmi-mof-register -v %{version} register \
%{_datadir}/%{name}/60_LMI_PCP.mof \
%{_localstatedir}/lib/%{name}/60_LMI_PCP_PMNS.mof \
@@ -658,7 +657,7 @@ if [ "$1" -eq 0 ]; then
fi
%preun -n openlmi-logicalfile
-if [ "$1" -gt 1 ]; then
+if [ "$1" -eq 0 ]; then
%{_bindir}/openlmi-mof-register -v %{version} unregister \
%{_datadir}/%{name}/60_LMI_LogicalFile.mof \
%{_datadir}/%{name}/60_LMI_LogicalFile.reg \
@@ -669,7 +668,7 @@ if [ "$1" -gt 1 ]; then
fi
%preun -n openlmi-realmd
-if [ "$1" -gt 1 ]; then
+if [ "$1" -eq 0 ]; then
%{_bindir}/openlmi-mof-register -v %{version} unregister \
%{_datadir}/%{name}/60_LMI_Realmd.mof \
%{_datadir}/%{name}/60_LMI_Realmd.reg \
@@ -680,7 +679,7 @@ if [ "$1" -gt 1 ]; then
fi
%preun -n openlmi-hardware
-if [ "$1" -gt 1 ]; then
+if [ "$1" -eq 0 ]; then
%{_bindir}/openlmi-mof-register -v %{version} unregister \
%{_datadir}/%{name}/60_LMI_Hardware.mof \
%{_datadir}/%{name}/60_LMI_Hardware.reg \
@@ -688,7 +687,7 @@ if [ "$1" -gt 1 ]; then
fi
%preun -n openlmi-pcp
-if [ "$1" -gt 1 ]; then
+if [ "$1" -eq 0 ]; then
%{_bindir}/openlmi-mof-register -v %{version} unregister \
%{_datadir}/%{name}/60_LMI_PCP.mof \
%{_localstatedir}/lib/%{name}/60_LMI_PCP_PMNS.mof \