From 92cc9501829398591c8cdd7ba36a8fbc4fa922c1 Mon Sep 17 00:00:00 2001 From: Craig Schardt Date: Wed, 16 Oct 2024 21:52:43 -0500 Subject: [PATCH] simplify the logic for asking to install NetworkManager --- install.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 7a5e7bb..0269eb4 100755 --- a/install.sh +++ b/install.sh @@ -211,20 +211,18 @@ cat /proc/cpuinfo DISTRO=$(lsb_release -is) if [[ "$INSTALL_NETWORK_MANAGER" == "ask" ]]; then - # make sure that asking about network manager makes sense if [[ "$DISTRO" != "Ubuntu" || -n "$DISABLE_NETWORKING" || -n "$QUIET" ]] ; then + # Only ask if it makes sense to do so INSTALL_NETWORK_MANAGER="no" - fi -fi - -if [[ "$INSTALL_NETWORK_MANAGER" == "ask" ]]; then - debug "" - debug "Photonvision uses NetworkManager to control networking on your device." - read -p "Do you want this script to install and configure NetworkManager? [y/N]: " response - if [[ $response == [yY] || $response == [yY][eE][sS] ]]; then - INSTALL_NETWORK_MANAGER="yes" else - INSTALL_NETWORK_MANAGER="no" + debug "" + debug "Photonvision uses NetworkManager to control networking on your device." + read -p "Do you want this script to install and configure NetworkManager? [y/N]: " response + if [[ $response == [yY] || $response == [yY][eE][sS] ]]; then + INSTALL_NETWORK_MANAGER="yes" + else + INSTALL_NETWORK_MANAGER="no" + fi fi fi