mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 18:10:07 +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() {
|
do_configure_wifi_country() {
|
||||||
oIFS="$IFS"
|
oIFS="$IFS"
|
||||||
IFS="/"
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
value=$(cat /usr/share/zoneinfo/iso3166.tab | tail -n +26 | tr '\t' '/' | tr '\n' '/')
|
IFS="/"
|
||||||
COUNTRY=$(whiptail --menu "Select the country in which the Pi is to be used" 20 60 10 ${value} 3>&1 1>&2 2>&3)
|
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 [ $? -eq 0 ];then
|
||||||
if grep -q "^country=" /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
|
sed -i "s/^country=.*/country=$COUNTRY/g" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user