[Fedora-directory-commits] ldapserver/ldap/cm/newinst setup, 1.13, 1.14
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Thu Nov 17 17:38:32 UTC 2005
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17579/ldapserver/ldap/cm/newinst
Modified Files:
setup
Log Message:
Fix two problems
1) setup was not using the correct value for the config admin ID during reconfig. The fix is to get the correct uid from the admpw file.
2) It is often difficult to figure out the correct id/url for the admin server when running it for the first time. The fix is for setup to print out the correct command to use so the user can copy/paste it into the terminal. The commands are also saved to setup.log in case they close the terminal window.
Index: setup
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/setup,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- setup 31 Oct 2005 15:55:35 -0000 1.13
+++ setup 17 Nov 2005 17:38:25 -0000 1.14
@@ -137,6 +137,19 @@
echo $rval
}
+getValFromAdmpw() {
+ cfile=$1
+ rval=`head -1 $sroot/admin-serv/config/$cfile | cut -f1 -d\:`
+ echo $rval
+}
+
+getValFromInf() {
+ cattr=$1
+ cfile=$2
+ rval=`grep -i ^$cattr $cfile | head -1 | sed -e 's/^.*=[ ]*//'`
+ echo $rval
+}
+
logfile=`doMktmp log`
myargs=
silent=
@@ -361,7 +374,7 @@
ldaphost=`getValFromAdminConf "ldapHost:" "adm.conf"`
ldapport=`getValFromAdminConf "ldapPort:" "adm.conf"`
adminport=`getValFromAdminConf "\<port:" "adm.conf"`
- siepid=`getValFromAdminConf "siepid:" "adm.conf"`
+ adminid=`getValFromAdmpw "admpw"`
sysuser=`getValFromAdminConf "nsSuiteSpotUser:" "local.conf"`
suitespotuser=`ls -l $sroot/$dsinst/config/dse.ldif | awk '{print $3}'`
suitespotgroup=`ls -l $sroot/$dsinst/config/dse.ldif | awk '{print $4}'`
@@ -374,11 +387,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: "
@@ -392,12 +405,12 @@
echo "SuitespotGroup= $suitespotgroup" >> $inffile
echo "ServerRoot= $sroot" >> $inffile
echo "ConfigDirectoryLdapURL= ldap://$ldaphost:$ldapport/o=NetscapeRoot" >> $inffile
- echo "ConfigDirectoryAdminID= $siepid" >> $inffile
+ echo "ConfigDirectoryAdminID= $adminid" >> $inffile
echo "AdminDomain= $admindomain" >> $inffile
echo "ConfigDirectoryAdminPwd= $siepasswd" >> $inffile
echo "" >> $inffile
echo "[admin]" >> $inffile
- echo "ServerAdminID= $siepid" >> $inffile
+ echo "ServerAdminID= $adminid" >> $inffile
echo "ServerAdminPwd= $siepasswd" >> $inffile
echo "SysUser= $sysuser" >> $inffile
echo "Port= $adminport" >> $inffile
@@ -499,6 +512,16 @@
SSLOn
+# get user, host, port for startconsole
+adminport=`getValFromInf Port $inffile`
+adminhost=`getValFromInf FullMachineName $inffile`
+adminuser=`getValFromInf ConfigDirectoryAdminID $inffile`
+
+echo ""
+echo "You can now use the console. Here is the command to use to start the console:" | tee -a $logfile
+echo "cd $sroot" | tee -a $logfile
+echo "./startconsole -u $adminuser -a http://$adminhost:$adminport/" | tee -a $logfile
+echo""
echo "INFO Finished with setup, logfile is setup/setup.log" | tee -a $logfile
if [ -f setup/setup.log ] ; then
cat $logfile >> setup/setup.log
@@ -518,4 +541,5 @@
fi
rm -f $inffile
fi
+
exit 0
More information about the Fedora-directory-commits
mailing list