Merge "Save interactive passwords to separate file"

This commit is contained in:
Jenkins 2015-10-19 15:48:05 +00:00 committed by Gerrit Code Review
commit 0ee76fd661
3 changed files with 14 additions and 5 deletions

View File

@ -134,7 +134,9 @@ rm -rf $DIRS_TO_CLEAN
# Clean up files # Clean up files
FILES_TO_CLEAN=".localrc.auto docs/files docs/html shocco/ stack-screenrc test*.conf* test.ini*" FILES_TO_CLEAN=".localrc.auto .localrc.password "
FILES_TO_CLEAN+="docs/files docs/html shocco/ "
FILES_TO_CLEAN+="stack-screenrc test*.conf* test.ini* "
FILES_TO_CLEAN+=".stackenv .prereqs" FILES_TO_CLEAN+=".stackenv .prereqs"
for file in $FILES_TO_CLEAN; do for file in $FILES_TO_CLEAN; do

View File

@ -562,7 +562,7 @@ function read_password {
if [[ -f $RC_DIR/localrc ]]; then if [[ -f $RC_DIR/localrc ]]; then
localrc=$TOP_DIR/localrc localrc=$TOP_DIR/localrc
else else
localrc=$TOP_DIR/.localrc.auto localrc=$TOP_DIR/.localrc.password
fi fi
# If the password is not defined yet, proceed to prompt user for a password. # If the password is not defined yet, proceed to prompt user for a password.
@ -572,13 +572,15 @@ function read_password {
touch $localrc touch $localrc
fi fi
# Presumably if we got this far it can only be that our localrc is missing # Presumably if we got this far it can only be that our
# the required password. Prompt user for a password and write to localrc. # localrc is missing the required password. Prompt user for a
# password and write to localrc.
echo '' echo ''
echo '################################################################################' echo '################################################################################'
echo $msg echo $msg
echo '################################################################################' echo '################################################################################'
echo "This value will be written to your localrc file so you don't have to enter it " echo "This value will be written to ${localrc} file so you don't have to enter it "
echo "again. Use only alphanumeric characters." echo "again. Use only alphanumeric characters."
echo "If you leave this blank, a random default value will be used." echo "If you leave this blank, a random default value will be used."
pw=" " pw=" "

View File

@ -103,6 +103,11 @@ HORIZON_APACHE_ROOT="/dashboard"
# be disabled for automated testing by setting this value to False. # be disabled for automated testing by setting this value to False.
USE_SCREEN=True USE_SCREEN=True
# Passwords generated by interactive devstack runs
if [[ -r $RC_DIR/.localrc.password ]]; then
source $RC_DIR/.localrc.password
fi
# allow local overrides of env variables, including repo config # allow local overrides of env variables, including repo config
if [[ -f $RC_DIR/localrc ]]; then if [[ -f $RC_DIR/localrc ]]; then
# Old-style user-supplied config # Old-style user-supplied config