|
Lines 351-367
pkg_config() {
Link Here
|
| 351 |
einfo "The database cluster will be created in:" |
351 |
einfo "The database cluster will be created in:" |
| 352 |
einfo " ${DATA_DIR}" |
352 |
einfo " ${DATA_DIR}" |
| 353 |
einfo |
353 |
einfo |
| 354 |
while [ "$correct" != "true" ] ; do |
354 |
|
| 355 |
einfo "Are you ready to continue? (y/n)" |
355 |
if [ -z "$PG_AUTOCONFIG" ] ; then |
| 356 |
read answer |
356 |
while [ "$correct" != "true" ] ; do |
| 357 |
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then |
357 |
einfo "Are you ready to continue? (y/n)" |
| 358 |
correct="true" |
358 |
read answer |
| 359 |
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then |
359 |
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then |
| 360 |
die "Aborting initialization." |
360 |
correct="true" |
| 361 |
else |
361 |
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then |
| 362 |
echo "Answer not recognized" |
362 |
die "Aborting initialization." |
| 363 |
fi |
363 |
else |
| 364 |
done |
364 |
echo "Answer not recognized" |
|
|
365 |
fi |
| 366 |
done |
| 367 |
else |
| 368 |
einfo "PG_AUTOCONFIG set, not prompting" |
| 369 |
fi |
| 365 |
|
370 |
|
| 366 |
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then |
371 |
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then |
| 367 |
eerror "The given directory, '${DATA_DIR}', is not empty." |
372 |
eerror "The given directory, '${DATA_DIR}', is not empty." |