summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-11-17 17:38:25 +0000
committerRich Megginson <rmeggins@redhat.com>2005-11-17 17:38:25 +0000
commit99d449ab02783cf2a47a29eb4b5ca80038c26d19 (patch)
treedb99c8279d04ed9f797da854009e9e0d55aad4d0
parent452d9de728b97039e44980a11ade5a58198a107f (diff)
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.
-rwxr-xr-xldap/cm/newinst/setup34
1 files changed, 29 insertions, 5 deletions
diff --git a/ldap/cm/newinst/setup b/ldap/cm/newinst/setup
index bea81614..87d27567 100755
--- a/ldap/cm/newinst/setup
+++ b/ldap/cm/newinst/setup
@@ -137,6 +137,19 @@ getValFromAdminConf() {
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 @@ if [ -f $sroot/admin-serv/config/adm.conf ]; then
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 @@ if [ -f $sroot/admin-serv/config/adm.conf ]; then
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 @@ if [ -f $sroot/admin-serv/config/adm.conf ]; then
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 @@ fi
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 @@ if [ $tmpinffile ]; then
fi
rm -f $inffile
fi
+
exit 0