From 352728ed145b0b79f293c8ee083ef179d2605a58 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Mon, 29 Jul 2013 09:50:53 +0000
Subject: [PATCH] Fix RPM uninstall issue and change group tag.
---
opends/resource/rpm/specFile | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/opends/resource/rpm/specFile b/opends/resource/rpm/specFile
index 4d778c5..bcd6666 100644
--- a/opends/resource/rpm/specFile
+++ b/opends/resource/rpm/specFile
@@ -43,7 +43,7 @@
# Software Licenced Under
License: CDDL
# RPM Group
-Group: Applications/Network
+Group: Productivity/Networking/LDAP/Servers
# Link to Application web site
URL: [[ referenceURL ]]
# Distributing Organisation
@@ -100,7 +100,7 @@
echo "Pre Install - initial install"
else if [ "$1" == "2" ] ; then
# Only if the instance has been configured
- if [ isInstanceConfigured ]
+ if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ]
then
echo "Pre Install - upgrade install"
# If the server is running before upgrade, creates a file flag
@@ -120,8 +120,8 @@
echo "Post Install - initial install"
else if [ "$1" == "2" ] ; then
echo "Post Install - upgrade install"
-# Only if the instance has been configured
- if [ isInstanceConfigured ]
+# Only if the instance has been configured
+ if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ]
then
"%{_prefix}"/./upgrade -n --acceptLicense
# Upgrade ok
@@ -158,8 +158,8 @@
%preun
if [ "$1" == "0" ] ; then
echo "Pre Uninstall - uninstall"
-# Only if the instance has been configured
- if [ isInstanceConfigured ]
+# Only if the instance has been configured
+ if [ -e "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ]
then
"%{_prefix}"/bin/./stop-ds
fi
@@ -178,16 +178,6 @@
fi
fi
-# -------------------------
-# Returns true/0 if the instance has been configured.
-isInstanceConfigured() {
- if [ -f "%{_prefix}"/config/buildinfo ] && [ "$(ls -A "%{_prefix}"/config/archived-configs)" ]
- then
- return 0
- else
- return 1
- fi
-}
# =========================
# Files section
# =========================
--
Gitblit v1.10.0