From 14fef45e477afe98df0a0a0876211b1199c347af Mon Sep 17 00:00:00 2001 From: jacobsalmela Date: Mon, 18 Jan 2016 21:53:09 -0600 Subject: [PATCH] cancel from interface screen also part of fixing #154 --- automated install/basic-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index d377eec8..cbe8cb46 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -103,12 +103,18 @@ done <<< "$availableInterfaces" interfaceCount=$(echo "$availableInterfaces" | wc -l) chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface" $r $c $interfaceCount) chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty) +if [[ $chooseInterfaceOptions ]];then for desiredInterface in $chooseInterfaceOptions do piholeInterface=$desiredInterface echo "Using interface: $piholeInterface" echo ${piholeInterface} > /tmp/piholeINT done +else + # Exit if user cancels + echo "Cancelling installation." + exit +fi } use4andor6()