mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +00:00
double-double-quote vars in echo for safety etc
This commit is contained in:
parent
38fd86ac90
commit
ef0ab50bd7
2 changed files with 10 additions and 11 deletions
|
@ -7,7 +7,7 @@ IIAB_STATE_FILE=/etc/iiab/iiab_state.yml
|
|||
IIAB_ENV_FILE=/etc/iiab/iiab.env
|
||||
|
||||
if [ ! -f $PLAYBOOK ]; then
|
||||
echo -e "\nExiting: IIAB Playbook $PLAYBOOK not found."
|
||||
echo -e "\nEXITING: IIAB Playbook ""$PLAYBOOK"" not found."
|
||||
echo -e "\nPlease run this in /opt/iiab/iiab (top level of the git repo)."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -18,13 +18,13 @@ if [ -f $IIAB_ENV_FILE ]; then
|
|||
source /etc/iiab/iiab.env
|
||||
echo -e "\nExtracted STAGE=$STAGE (counter) from /etc/iiab/iiab.env"
|
||||
if ! [ "$STAGE" -eq "$STAGE" ] 2> /dev/null; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == $STAGE is non-integer"
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is non-integer"
|
||||
exit 1
|
||||
elif [ "$STAGE" -lt 0 ] || [ "$STAGE" -gt 9 ]; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == $STAGE is out-of-range"
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is out-of-range"
|
||||
exit 1
|
||||
elif [ "$STAGE" -lt 3 ]; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == $STAGE"
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"
|
||||
echo -e "\nIIAB Stage 3 not complete."
|
||||
echo -e "\nPlease run: ./iiab-install"
|
||||
exit 1
|
||||
|
@ -43,10 +43,8 @@ else
|
|||
fi
|
||||
|
||||
# Workaround for (web-published) images; will go away later
|
||||
if grep -q sugar $IIAB_STATE_FILE; then
|
||||
if ! grep -q mongodb $IIAB_STATE_FILE; then
|
||||
echo "mongodb_installed: True" >> $IIAB_STATE_FILE
|
||||
fi
|
||||
if grep -q sugar $IIAB_STATE_FILE; && ! grep -q mongodb $IIAB_STATE_FILE; then
|
||||
echo "mongodb_installed: True" >> $IIAB_STATE_FILE
|
||||
fi
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-configure.log"
|
||||
|
|
|
@ -31,7 +31,7 @@ if [ ! -f /etc/iiab/local_vars.yml ]; then
|
|||
echo -e "(2) MIN/MEDIUM/BIG samples are included in /opt/iiab/iiab/vars" >&2
|
||||
echo -e "(3) NO TIME FOR DETAILS? RUN INTERNET-IN-A-BOX'S FRIENDLY 1-LINE INSTALLER:\n" >&2
|
||||
|
||||
echo -e ' http://download.iiab.io (click on "7.0" or a more recent version!)\n' >&2
|
||||
echo -e ' http://download.iiab.io\n' >&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
@ -47,8 +47,8 @@ cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
|||
echo "Placed /etc/ansible/facts.d/local_facts.fact into position."
|
||||
|
||||
if [ ! -f $PLAYBOOK ]; then
|
||||
echo "EXITING: IIAB Playbook not found."
|
||||
echo "Please run 'iiab-install' from /opt/iiab/iiab (top level of git repo)."
|
||||
echo "EXITING: IIAB Playbook ""$PLAYBOOK"" not found."
|
||||
echo "Please run './iiab-install' from /opt/iiab/iiab (top level of git repo)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -152,6 +152,7 @@ fi
|
|||
|
||||
# Assumes /etc/iiab/iiab_state.yml is not created until (prior run of) Stage 4.
|
||||
if [ -f $IIAB_STATE_FILE ]; then
|
||||
# Workaround for (web-published) images; will go away later
|
||||
if grep -q sugar $IIAB_STATE_FILE; && ! grep -q mongodb $IIAB_STATE_FILE; then
|
||||
echo "mongodb_installed: True" >> $IIAB_STATE_FILE
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue