From 3cfd78c405be425e75e78bf3d3f36016d3c4653d Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 29 Jul 2013 12:39:59 +0200 Subject: Fixed %post scripts to register providers on installation and %preun to uninstall them. --- openlmi-providers.spec | 17 ++++++++--------- 1 file 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 \ -- cgit