diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2005-11-17 23:51:54 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2005-11-17 23:51:54 +0000 |
commit | 431aac871030e0f7898415d63dfff7a54d80ff3c (patch) | |
tree | 16ebcd1be09d5d9c83c8e079e90813c574c66a16 /ldap/cm/newinst | |
parent | fe8cdf5e635818d899f27f6edf8abd8c9a700e4c (diff) | |
download | ds-431aac871030e0f7898415d63dfff7a54d80ff3c.tar.gz ds-431aac871030e0f7898415d63dfff7a54d80ff3c.tar.xz ds-431aac871030e0f7898415d63dfff7a54d80ff3c.zip |
[173524] setup scripts retrieves incorrect adminid
Fixed to get the adminid from the right place: adminpw
Diffstat (limited to 'ldap/cm/newinst')
-rwxr-xr-x | ldap/cm/newinst/setup.patch | 67 |
1 files changed, 39 insertions, 28 deletions
diff --git a/ldap/cm/newinst/setup.patch b/ldap/cm/newinst/setup.patch index 45004736..ebc67ec0 100755 --- a/ldap/cm/newinst/setup.patch +++ b/ldap/cm/newinst/setup.patch @@ -95,6 +95,12 @@ getValFromAdminConf() { 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 @@ fi 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 "In order to reconfigure your installation, the Configuration Directory" 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 "SuiteSpotUserID= $suitespotuser" >> $inffile 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 @@ adminXmlSSLOn() { 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 |