From bc5fd6a86d21ce2bc254c249894afa1c38240309 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 14 Nov 2019 12:01:11 -0500 Subject: [PATCH 1/4] syntax: echo "$var" + rpi-update warning --- iiab-install | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/iiab-install b/iiab-install index baa40c55c..92d0ead94 100755 --- a/iiab-install +++ b/iiab-install @@ -68,10 +68,11 @@ version_gt() { [ "$(printf '%s\n' "$@" | sort -V | head -1)" != "$1" ]; } # Verify that Raspbian is running a recent enough kernel. As Raspbian # updates on 4.9.41-v7+ broke bridging, WiFi AP & OpenVPN in Oct/Nov 2017. CURR_KERN=`uname -r` -echo "Found Kernel "$CURR_KERN"" +echo "Found Kernel ""$CURR_KERN" if [ "$OS" == "raspbian" ] && version_gt $MIN_RPI_KERN $CURR_KERN ; then - echo -e "\nEXITING: Kernel "$MIN_RPI_KERN" or higher required with Raspbian." + echo -e "\nEXITING: Kernel ""$MIN_RPI_KERN"" or higher required with Raspbian." echo -e "PLEASE RUN 'apt update' then 'apt install raspberrypi-kernel' then reboot." + echo -e "IF TRULY NEC: run 'rpi-update' to install a very recent kernel, then reboot." echo -e "IIAB INSTALL INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation" exit 1 fi @@ -89,10 +90,10 @@ if [[ `command -v ansible` ]]; then # "command -v" is POSIX compliant; it #CURR_ANSIBLE_VER=`ansible --version | head -1 | sed -e 's/.* //'` #CURR_ANSIBLE_VER=`ansible --version | head -1 | cut -f 2 -d " "` CURR_ANSIBLE_VER=`ansible --version | head -1 | awk '{print $2}'` # to match scripts/ansible - echo "Found Ansible "$CURR_ANSIBLE_VER"" + echo "Found Ansible ""$CURR_ANSIBLE_VER" fi if version_gt $MIN_ANSIBLE_VER $CURR_ANSIBLE_VER ; then - echo -e "\nEXITING: Ansible "$MIN_ANSIBLE_VER" or higher required.\n" + echo -e "\nEXITING: Ansible ""$MIN_ANSIBLE_VER"" or higher required.\n" echo -e "REMOVE PRIOR VERSIONS using 'apt purge ansible' and/or 'pip uninstall ansible'." echo -e "THEN RUN 'scripts/ansible' to install the latest Ansible from PPA or RPM." @@ -108,12 +109,12 @@ STAGE=0 if [ -f /etc/iiab/iiab.env ]; then if grep -q STAGE= /etc/iiab/iiab.env ; then source /etc/iiab/iiab.env - echo "Extracted STAGE="$STAGE" (counter) from /etc/iiab/iiab.env" + echo "Extracted 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 in /etc/iiab/iiab.env" + echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is non-integer in /etc/iiab/iiab.env" exit 1 elif [ "$STAGE" -lt 0 ] || [ "$STAGE" -gt 9 ]; then - echo -e "\nEXITING: STAGE (counter) value == "$STAGE" is out-of-range in /etc/iiab/iiab.env" + echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is out-of-range in /etc/iiab/iiab.env" exit 1 fi fi @@ -124,7 +125,7 @@ if [ -f /etc/iiab/iiab.env ]; then echo "Removed /etc/iiab/iiab.env effectively resetting STAGE (counter)." elif [ "$1" == "--reinstall" ]; then STAGE=0 - ARGS="$ARGS --extra-vars reinstall=True" + ARGS="$ARGS"" --extra-vars reinstall=True" sed -i 's/^STAGE=.*/STAGE=0/' /etc/iiab/iiab.env echo "Wrote STAGE=0 (counter) to /etc/iiab/iiab.env" elif [ "$STAGE" -ge 2 ] && [ "$1" == "--debug" ]; then @@ -148,7 +149,7 @@ echo -e "\nTRY TO RERUN './iiab-install' IF IT FAILS DUE TO CONNECTIVITY ISSUES echo -e "Running local playbooks....Stage 0 will now run....followed by Stages $(($STAGE + 1))-9" -export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" +export ANSIBLE_LOG_PATH="$CWD""/iiab-install.log" ansible -m setup -i $INVENTORY localhost --connection=local | grep python ansible -m setup -i $INVENTORY localhost --connection=local >> /dev/null # So vars are recorded in /opt/iiab/iiab/iiab-install.log From 9605368e6ce7a3834ee0362a4526b2b0c258bb28 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 14 Nov 2019 12:03:51 -0500 Subject: [PATCH 2/4] Update iiab-install --- iiab-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-install b/iiab-install index 92d0ead94..6ac1dc4d4 100755 --- a/iiab-install +++ b/iiab-install @@ -72,7 +72,7 @@ echo "Found Kernel ""$CURR_KERN" if [ "$OS" == "raspbian" ] && version_gt $MIN_RPI_KERN $CURR_KERN ; then echo -e "\nEXITING: Kernel ""$MIN_RPI_KERN"" or higher required with Raspbian." echo -e "PLEASE RUN 'apt update' then 'apt install raspberrypi-kernel' then reboot." - echo -e "IF TRULY NEC: run 'rpi-update' to install a very recent kernel, then reboot." + echo -e "IF TRULY NEC, run 'rpi-update' to install a very recent kernel, then reboot." echo -e "IIAB INSTALL INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation" exit 1 fi From 0b7e935a41ee2f95338f8c33ad8a0e6d21f04a3c Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 14 Nov 2019 12:05:30 -0500 Subject: [PATCH 3/4] Update iiab-install --- iiab-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-install b/iiab-install index 6ac1dc4d4..87475c0d3 100755 --- a/iiab-install +++ b/iiab-install @@ -72,7 +72,7 @@ echo "Found Kernel ""$CURR_KERN" if [ "$OS" == "raspbian" ] && version_gt $MIN_RPI_KERN $CURR_KERN ; then echo -e "\nEXITING: Kernel ""$MIN_RPI_KERN"" or higher required with Raspbian." echo -e "PLEASE RUN 'apt update' then 'apt install raspberrypi-kernel' then reboot." - echo -e "IF TRULY NEC, run 'rpi-update' to install a very recent kernel, then reboot." + echo -e "THEN IF NEC, run 'rpi-update' to install a more recent kernel, then reboot." echo -e "IIAB INSTALL INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation" exit 1 fi From 191e10c962a3bd6221d5458d7837668c9b3e3a34 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 14 Nov 2019 12:09:24 -0500 Subject: [PATCH 4/4] Update iiab-install --- iiab-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiab-install b/iiab-install index 87475c0d3..734caf682 100755 --- a/iiab-install +++ b/iiab-install @@ -72,7 +72,7 @@ echo "Found Kernel ""$CURR_KERN" if [ "$OS" == "raspbian" ] && version_gt $MIN_RPI_KERN $CURR_KERN ; then echo -e "\nEXITING: Kernel ""$MIN_RPI_KERN"" or higher required with Raspbian." echo -e "PLEASE RUN 'apt update' then 'apt install raspberrypi-kernel' then reboot." - echo -e "THEN IF NEC, run 'rpi-update' to install a more recent kernel, then reboot." + echo -e "THEN IF NEC run 'rpi-update' to install a more recent kernel, then reboot." echo -e "IIAB INSTALL INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation" exit 1 fi