From 443fe43ecce8ac84e57ed6f3736c86c33604719c Mon Sep 17 00:00:00 2001 From: ryt51V Date: Sat, 27 Feb 2016 20:19:24 +0000 Subject: [PATCH] Simplified use4andor6 logic. --- automated install/basic-install.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c4a188b1..af9e40ec 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -191,24 +191,21 @@ use4andor6() { esac done - if [ $useIPv4 ] && [ ! $useIPv6 ]; then + if [ $useIPv4 ]; then getStaticIPv4Settings setStaticIPv4 echo "::: Using IPv4 on $IPv4addr" - echo "::: IPv6 will NOT be used." - fi - if [ ! $useIPv4 ] && [ $useIPv6 ]; then - useIPv6dialog - echo "::: IPv4 will NOT be used." - echo "::: Using IPv6 on $piholeIPv6" - fi - if [ $useIPv4 ] && [ $useIPv6 ]; then - getStaticIPv4Settings - setStaticIPv4 - useIPv6dialog - echo "::: Using IPv4 on $IPv4addr" - echo "::: Using IPv6 on $piholeIPv6" - fi + else + echo "::: Using IPv6 on $piholeIPv6" + fi + + if [ $useIPv6 ]; then + useIPv6dialog + echo "::: Using IPv6 on $piholeIPv6" + else + echo "::: IPv6 will NOT be used." + fi + if [ ! $useIPv4 ] && [ ! $useIPv6 ]; then echo "::: Cannot continue, neither IPv4 or IPv6 selected" echo "::: Exiting"