mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Wifi setting in raspi-config can now be called in non-interactive mode.
This commit is contained in:
parent
27d962dc7d
commit
858e438f70
11
raspi-config
11
raspi-config
@ -274,9 +274,14 @@ do_change_timezone() {
|
||||
|
||||
do_configure_wifi_country() {
|
||||
oIFS="$IFS"
|
||||
IFS="/"
|
||||
value=$(cat /usr/share/zoneinfo/iso3166.tab | tail -n +26 | tr '\t' '/' | tr '\n' '/')
|
||||
COUNTRY=$(whiptail --menu "Select the country in which the Pi is to be used" 20 60 10 ${value} 3>&1 1>&2 2>&3)
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
IFS="/"
|
||||
value=$(cat /usr/share/zoneinfo/iso3166.tab | tail -n +26 | tr '\t' '/' | tr '\n' '/')
|
||||
COUNTRY=$(whiptail --menu "Select the country in which the Pi is to be used" 20 60 10 ${value} 3>&1 1>&2 2>&3)
|
||||
else
|
||||
COUNTRY=$1
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user