Skip to content

Commit

Permalink
setup-teslausb: only add country code if a network was specified
Browse files Browse the repository at this point in the history
Avoids unnecessary change&reboot when Network Manager is used instead
of wpa_supplicant.
  • Loading branch information
marcone committed Oct 24, 2023
1 parent a8f0080 commit 463f382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/pi/setup-teslausb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ REBOOT=false
# wpa_supplicant should have a country code. Use US as the default
# to avoid using the disallowed channels in the US.
WPA=/etc/wpa_supplicant/wpa_supplicant.conf
if [ -e "$WPA" ] && ! grep -q "country=" $WPA
if [ -e "$WPA" ] && ! grep -q "country=" $WPA && grep -q "network=" $WPA
then
setup_progress "adding country code to wpa_supplicant.conf"
echo "country=US" >> $WPA
Expand Down

0 comments on commit 463f382

Please sign in to comment.