summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-04-07 15:14:28 +0000
committerRich Megginson <rmeggins@redhat.com>2005-04-07 15:14:28 +0000
commit898270bfcba3fbcb6e3e2082a60fb7a1d49a0028 (patch)
treef79822d16c0a3cfd50b208cc0e7d98f00825fc66
parentd6f0b967cbd31149ca726970dd188a410e24d621 (diff)
downloadds-898270bfcba3fbcb6e3e2082a60fb7a1d49a0028.tar.gz
ds-898270bfcba3fbcb6e3e2082a60fb7a1d49a0028.tar.xz
ds-898270bfcba3fbcb6e3e2082a60fb7a1d49a0028.zip
Bug(s) fixed: 154064
Bug Description: RPM setup should prompt for install mode Reviewed by: Nathan (Thanks!) Files: see diff Branch: HEAD Fix Description: Added a new shell function ask123 to ask the user for the install mode. Use the -m mode argument to ns-config. Platforms tested: RHEL3 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
-rwxr-xr-xldap/cm/newinst/setup38
1 files changed, 36 insertions, 2 deletions
diff --git a/ldap/cm/newinst/setup b/ldap/cm/newinst/setup
index 0582a240..fb46d2ee 100755
--- a/ldap/cm/newinst/setup
+++ b/ldap/cm/newinst/setup
@@ -57,6 +57,28 @@ askYN() {
done
}
+ask123() {
+ prompt=$2
+ default=$1
+ finished=
+ ans=
+ while ! [ $finished ]; do
+ echo -n ""
+ echo ""
+ echo -n $prompt "" | tee -a $logfile
+ read ans
+ echo $ans >> $logfile
+ if ! [ $ans ]; then
+ return $default
+ fi
+ case "$ans" in
+ 1|2|3) finished=1 ;;
+ *) echo "Please answer 1, 2, or 3" | tee -a $logfile ;;
+ esac
+ done
+ return $ans
+}
+
logfile=`doMktmp log`
myargs=
silent=
@@ -121,6 +143,18 @@ if ! [ $silent ]; then
askYN "Continue?"
fi
+# install mode
+if ! [ $silent ]; then
+ echo ""
+ echo "Please select the install mode:"
+ echo " 1 - Express - minimal questions"
+ echo " 2 - Typical - some customization (default)"
+ echo " 3 - Custom - lots of customization"
+
+ ask123 "2" "Please select 1, 2, or 3 (default: 2) "
+ installmode=$?
+fi
+
# if silent mode, do not run the pre-installer programs
# otherwise, create a temp file for their use
if ! [ $silent ]; then
@@ -169,12 +203,12 @@ if ! [ $silent ]; then
# first, run ds
cd bin/slapd/admin/bin
- ./ns-config -f $inffile -l $logfile || doExit
+ ./ns-config -f $inffile -l $logfile -m $installmode || doExit
cd ../../../..
# next, run admin
cd bin/admin
- ./ns-config -f $inffile -l $logfile || doExit
+ ./ns-config -f $inffile -l $logfile -m $installmode || doExit
cd ../..
fi