summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2005-09-02 23:30:49 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2005-09-02 23:30:49 +0000
commitcf01f197237170aca76b1359de27235a1a144bd4 (patch)
tree42d838b4eb922a1bc255faf010a3e42b81a8d13f
parent2f5d4f11d06daf886ad9549092fe562517c43d10 (diff)
downloadds-cf01f197237170aca76b1359de27235a1a144bd4.tar.gz
ds-cf01f197237170aca76b1359de27235a1a144bd4.tar.xz
ds-cf01f197237170aca76b1359de27235a1a144bd4.zip
[167478] setup script needs to check the DS instance
if the instance dir exists, run ns-config with "-r".
-rwxr-xr-xldap/cm/newinst/setup13
1 files changed, 12 insertions, 1 deletions
diff --git a/ldap/cm/newinst/setup b/ldap/cm/newinst/setup
index 45bc474c..3d7819ed 100755
--- a/ldap/cm/newinst/setup
+++ b/ldap/cm/newinst/setup
@@ -248,9 +248,20 @@ if ! [ $silent ]; then
echo "SuiteSpotGroup = $group" >> $inffile
echo ServerRoot = `pwd` >> $inffile
+ # check if ds instance directory exists or not
+ # if it does, run ns-config with the reconfigure option
+ doreconfig=""
+ for x in `ls -d slapd-*`
+ do
+ if [ -d $x ]; then
+ doreconfig="-r"
+ break
+ fi
+ done
+
# first, run ds
cd bin/slapd/admin/bin
- ./ns-config -f $inffile -l $logfile -m $installmode || doExit
+ ./ns-config -f $inffile -l $logfile -m $installmode $doreconfig || doExit
cd ../../../..
# next, run admin