[Fedora-directory-commits] ldapserver/ldap/cm/newinst setup.patch, 1.2, 1.3

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Thu Nov 17 23:52:01 UTC 2005


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28462

Modified Files:
	setup.patch 
Log Message:
[173524] setup scripts retrieves incorrect adminid
Fixed to get the adminid from the right place: adminpw


setup.patch:

Index: setup.patch
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/setup.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup.patch	25 Oct 2005 16:55:49 -0000	1.2
+++ setup.patch	17 Nov 2005 23:51:54 -0000	1.3
@@ -95,6 +95,12 @@
     echo $rval
 }
 
+getValFromAdmpw() {
+    cfile=$1
+    rval=`head -1 $serverroot/admin-serv/config/$cfile | awk -F\: '{print $1}'`
+    echo $rval
+}
+
 dsinst=`getValFromAdminConf "ldapStart:" "adm.conf" | awk -F/ '{print $1}'`
 dsconffile=$serverroot/$dsinst/config/dse.ldif
 if [ ! -f $dsconffile ]; then
@@ -197,7 +203,7 @@
 
 ldaphost=`getValFromAdminConf "ldapHost:" "adm.conf"`
 ldapport=`getValFromAdminConf "ldapPort:" "adm.conf"`
-siepid=`getValFromAdminConf "siepid:" "adm.conf"`
+adminid=`getValFromAdmpw "admpw"`
 suitespotuser=`ls -l $dsconffile | awk '{print $3}'`
 suitespotgroup=`ls -l $dsconffile | awk '{print $4}'`
 admindomain=`echo $ldaphost | awk -F. '{if ($5) {print $2 "." $3 "." $4 "." $5} else if ($4) {print $2 "." $3 "." $4} else if ($3) {print $2 "." $3} else if ($2) {print $2} else {print ""}}'`
@@ -215,11 +221,11 @@
 echo "Administrator password is required.  Here is your current information:"
 echo ""
 echo "Configuration Directory: ldap://$ldaphost:$ldapport/o=NetscapeRoot"
-echo "Configuration Administrator ID: $siepid"
+echo "Configuration Administrator ID: $adminid"
 echo ""
 echo "At the prompt, please enter the password for the Configuration Administrator."
 echo ""
-echo "administrator ID: $siepid"
+echo "administrator ID: $adminid"
 siepasswd=""
 while [ "$siepasswd" = "" ]; do
     printf "Password: "
@@ -234,7 +240,7 @@
 echo "SuitespotGroup=   $suitespotgroup" >> $inffile
 echo "ServerRoot=   $serverroot" >> $inffile
 echo "ConfigDirectoryLdapURL=   ldap://$ldaphost:$ldapport/" >> $inffile
-echo "ConfigDirectoryAdminID=   $siepid" >> $inffile
+echo "ConfigDirectoryAdminID=   $adminid" >> $inffile
 echo "AdminDomain=   $admindomain" >> $inffile
 echo "ConfigDirectoryAdminPwd=   $siepasswd" >> $inffile
 echo "Components=   slapd-71sp1" >> $inffile
@@ -272,36 +278,41 @@
     echo "$conffile: SSL on ..."
 }
 
-for dir in `cat dssecure.txt` ; do
-    clear
-    if [ -f $dir/config/dse.ldif ]; then
-        security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
-        $dir/stop-slapd
-        cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 on/g" > $dir/config/dse.ldif.0
-        mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
-        echo "$dir/config/dse.ldif: SSL on ..."
-        echo "Restarting Directory Server: $dir/start-slapd"
-        $dir/start-slapd
-    fi
-done
+if [ -f dssecure.txt ]; then
+    for dir in `cat dssecure.txt` ; do
+        clear
+        if [ -f $dir/config/dse.ldif ]; then
+            security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
+            $dir/stop-slapd
+            cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 on/g" > $dir/config/dse.ldif.0
+            mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
+            echo "$dir/config/dse.ldif: SSL on ..."
+            echo "Restarting Directory Server: $dir/start-slapd"
+            $dir/start-slapd
+        fi
+    done
+    rm -f dssecure.txt
+fi
 
 if [ $isadminsslon -ne 0 ]; then
     $serverroot/stop-admin
 fi
-for confline in `cat assecure.txt` ; do
-    conffile=`echo $confline | awk -F= '{print $1}'`
-    confparam=`echo $confline | awk -F= '{print $2}'`
-    echo $conffile | grep "\.xml$" > /dev/null 2>&1
-    rval=$?
-    if [ $rval -eq 0 ]; then
-        adminXmlSSLOn $conffile $confparam
-    else
-        adminSSLOn $conffile $confparam
-    fi
-done
+if [ -f assecure.txt ]; then
+    for confline in `cat assecure.txt` ; do
+        conffile=`echo $confline | awk -F= '{print $1}'`
+        confparam=`echo $confline | awk -F= '{print $2}'`
+        echo $conffile | grep "\.xml$" > /dev/null 2>&1
+        rval=$?
+        if [ $rval -eq 0 ]; then
+            adminXmlSSLOn $conffile $confparam
+        else
+            adminSSLOn $conffile $confparam
+        fi
+    done
+    rm -f assecuire.txt
+fi
 if [ $isadminsslon -ne 0 ]; then
     echo "Restarting Administration Server: $serverroot/start-admin"
     $serverroot/start-admin
 fi
 
-rm -f dssecure.txt assecuire.txt




More information about the Fedora-directory-commits mailing list