Save interactive passwords to separate file
The interactive password prompt currently saves to .localrc.auto However, this is removed when you re-run stack; that is required as it is how we source the localrc bits of local.conf, and we want the users' changes to be picked up. The passwords, however, should remain constant, because everything has already been setup with them. So write them to a separate file. Note we source before localrc so it can still overwrite them. Some minor flow-changes too Change-Id: I9871c8b8c7569626faf552628de69b811ba4dac0 Closes-Bug: #1505872
This commit is contained in:
parent
188b38fc80
commit
975f4209d0
4
clean.sh
4
clean.sh
@ -134,7 +134,9 @@ rm -rf $DIRS_TO_CLEAN
|
||||
|
||||
# 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"
|
||||
|
||||
for file in $FILES_TO_CLEAN; do
|
||||
|
10
stack.sh
10
stack.sh
@ -569,7 +569,7 @@ function read_password {
|
||||
if [[ -f $RC_DIR/localrc ]]; then
|
||||
localrc=$TOP_DIR/localrc
|
||||
else
|
||||
localrc=$TOP_DIR/.localrc.auto
|
||||
localrc=$TOP_DIR/.localrc.password
|
||||
fi
|
||||
|
||||
# If the password is not defined yet, proceed to prompt user for a password.
|
||||
@ -579,13 +579,15 @@ function read_password {
|
||||
touch $localrc
|
||||
fi
|
||||
|
||||
# Presumably if we got this far it can only be that our localrc is missing
|
||||
# the required password. Prompt user for a password and write to localrc.
|
||||
# Presumably if we got this far it can only be that our
|
||||
# localrc is missing the required password. Prompt user for a
|
||||
# password and write to localrc.
|
||||
|
||||
echo ''
|
||||
echo '################################################################################'
|
||||
echo $msg
|
||||
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 "If you leave this blank, a random default value will be used."
|
||||
pw=" "
|
||||
|
5
stackrc
5
stackrc
@ -103,6 +103,11 @@ HORIZON_APACHE_ROOT="/dashboard"
|
||||
# be disabled for automated testing by setting this value to False.
|
||||
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
|
||||
if [[ -f $RC_DIR/localrc ]]; then
|
||||
# Old-style user-supplied config
|
||||
|
Loading…
Reference in New Issue
Block a user