From 34ef24e42b23d094a2dc9a2ff9904569318602f8 Mon Sep 17 00:00:00 2001
From: chebrard <chebrard@localhost>
Date: Mon, 26 Jan 2009 15:54:02 +0000
Subject: [PATCH] Frontport of all fixes related to SVR4 from branch 1.2 to trunk:
---
opends/resource/configure | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/opends/resource/configure b/opends/resource/configure
index eb67078..5bbde7c 100755
--- a/opends/resource/configure
+++ b/opends/resource/configure
@@ -57,17 +57,28 @@
# return part
RETURN_CODE=$?
-if test ${RETURN_CODE} -eq 50
+if test ${RETURN_CODE} -eq 50 -o ${RETURN_CODE} -eq 51
then
- # Version info was on requested
+ # Version or help info was on requested
exit 0
else
+if test ${RETURN_CODE} -eq 10
+then
+ # Syntax error
+ exit 1
+else
if test ${RETURN_CODE} -eq 0
then
+ # Retrieve INSTANCE_ROOT
+ INSTANCE_ROOT=`cat /etc/opends/instance.loc`
# Now update SMF manifest, cp it to the right place and import it
- USER_GROUP=`ls -ld ${INSTANCE_ROOT} | cut -c16-33`
- USERNAME=`echo ${USER_GROUP} | cut -c1-8`
- GROUPNAME=`echo ${USER_GROUP} | cut -c9-16`
+ OWNER=`ls -ld ${INSTANCE_ROOT}`
+ CURRENT_IFS=${IFS}
+ IFS=" "
+ set -- ${OWNER}
+ USERNAME=`echo $3`
+ GROUPNAME=`echo $4`
+ IFS=${CURRENT_IFS}
if test "${USERNAME}" = "ldap" -a "$GROUPNAME" = "ldap"
then
cp ${INSTALL_ROOT}/resources/opends-manifest.xml /var/svc/manifest/network/ldap/
@@ -80,3 +91,4 @@
fi
exit ${RETURN_CODE}
fi
+fi
--
Gitblit v1.10.0