Skip to content

Commit

Permalink
simplify the logic for asking to install NetworkManager
Browse files Browse the repository at this point in the history
  • Loading branch information
crschardt committed Oct 17, 2024
1 parent 17606f9 commit 92cc950
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 92cc950

Please sign in to comment.