From d4f9f233ca2e842efa78a4444f423710f1998530 Mon Sep 17 00:00:00 2001 From: Abel Tim Date: Sun, 1 Jun 2025 16:15:53 +0200 Subject: fixed option 3 actualy exiting, 2--> no sudo, says how to exit now, and check internet with ping no wget. micro pushes becouse i need to download it on my other maching via the manual in the folder Signed-off-by: Abel Tim --- setup/selectscript.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'setup/selectscript.sh') diff --git a/setup/selectscript.sh b/setup/selectscript.sh index 837bf3e..9f0a1f9 100644 --- a/setup/selectscript.sh +++ b/setup/selectscript.sh @@ -3,15 +3,15 @@ echo 'Welkom to the robosoccer guided installment script!' #check sudo if [ `whoami` != root ]; then - echo Please run this script as root or using sudo + echo "Please run this script as root or using sudo" + echo "To exit press Ctrl-c" exit fi #check internet connection -wget -q --spider https://github.com -if [ $? -eq 0 ]; then +if ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null ; then echo 'Internet connection found' else - echo 'Error, either your device is off-line or https://github.com is off-line.' + echo 'Error, either your device appears to be off-line.' exit fi -- cgit v1.2.3