From 867154ca4bdcba8fe2c4a502711afba3dc6d686c Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Wed, 18 Oct 2017 10:48:01 -0400 Subject: [PATCH] Update install.sh --- install.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index e0a6471..fe49e03 100644 --- a/install.sh +++ b/install.sh @@ -66,13 +66,18 @@ echo "exit 0" | sudo tee --append /etc/rc.local echo " -=- Time to set up the Pi0 -=-" echo " -=- Logging into the Pi0 -=-" -if ! /opt/diy-ipmi/Pi3/checkPi0Login.sh; then - echo " -=- Logging into the Pi0 as 'pi' with password 'raspberry' has failed -=-" - echo " Open another terminal session and use 'screen /dev/ttyUSB0 115200' to login to the Pi0" - echo " Once logged in, hit 'Ctrl-A' then type ':quit' to exit the screen session" - echo " Lastly, return here and press 'Enter' to continue or 'Ctrl-C' to give up. -=-" - read CONT -fi +LOGINSUCCESS=0 +while [ $LOGINSUCCESS -eq 0 ]; do + if ! /opt/diy-ipmi/Pi3/checkPi0Login.sh; then + echo " -=- Logging into the Pi0 as 'pi' with password 'raspberry' has failed -=-" + echo " Open another terminal session and use 'screen /dev/ttyUSB0 115200' to login to the Pi0" + echo " Once logged in, hit 'Ctrl-A' then type ':quit' to exit the screen session" + echo " Lastly, return here and press 'Enter' to continue or 'Ctrl-C' to give up. -=-" + read CONT + else + LOGINSUCCESS=1 + fi +done echo " -=- Setting up auto login on the serial terminal -=-" echo "sudo systemctl enable serial-getty@ttyAMA0.service" >> /dev/ttyUSB0