mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Wifi country code setting now creates wpa_supplicant.conf if it doesn't exist.
This commit is contained in:
parent
b03f0ece9f
commit
1becd779ed
10
raspi-config
10
raspi-config
@ -283,10 +283,14 @@ do_configure_wifi_country() {
|
||||
true
|
||||
fi
|
||||
if [ $? -eq 0 ];then
|
||||
if grep -q "^country=" /etc/wpa_supplicant/wpa_supplicant.conf ; then
|
||||
sed -i "s/^country=.*/country=$COUNTRY/g" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
if [ -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
||||
if grep -q "^country=" /etc/wpa_supplicant/wpa_supplicant.conf ; then
|
||||
sed -i "s/^country=.*/country=$COUNTRY/g" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
else
|
||||
sed -i "1i country=$COUNTRY" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
fi
|
||||
else
|
||||
sed -i "1i country=$COUNTRY" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
fi
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
whiptail --msgbox "Wi-fi country set to $COUNTRY" 20 60 1
|
||||
|
Loading…
Reference in New Issue
Block a user