|
@@ -1932,6 +1932,21 @@ function menu_media {
|
1932
|
1932
|
done
|
1933
|
1933
|
}
|
1934
|
1934
|
|
|
1935
|
+function wifi_enable {
|
|
1936
|
+ disable_wifi='yes'
|
|
1937
|
+ dialog --title $"Enable Wifi" \
|
|
1938
|
+ --backtitle $"Freedombone Control Panel" \
|
|
1939
|
+ --defaultno \
|
|
1940
|
+ --yesno $"\nDo you wish to enable wifi?" 10 50
|
|
1941
|
+ sel=$?
|
|
1942
|
+ case $sel in
|
|
1943
|
+ 0) disable_wifi='no';;
|
|
1944
|
+ 1) disable_wifi='yes';;
|
|
1945
|
+ 255) return;;
|
|
1946
|
+ esac
|
|
1947
|
+ ${PROJECT_NAME}-wifi --disable $disable_wifi
|
|
1948
|
+}
|
|
1949
|
+
|
1935
|
1950
|
function menu_wifi {
|
1936
|
1951
|
hotspot_state=$'off'
|
1937
|
1952
|
if [ -f /etc/hostapd/hostapd.conf ]; then
|
|
@@ -1944,21 +1959,23 @@ function menu_wifi {
|
1944
|
1959
|
trap "rm -f $data" 0 1 2 5 15
|
1945
|
1960
|
dialog --backtitle $"Freedombone Control Panel" \
|
1946
|
1961
|
--title $"Wifi Menu" \
|
1947
|
|
- --radiolist $"Choose an operation:" 12 70 4 \
|
1948
|
|
- 1 $"Configure wifi networks" off \
|
1949
|
|
- 2 $"Manually edit wifi networks file" off \
|
1950
|
|
- 3 $"Hotspot settings" off \
|
1951
|
|
- 4 $"Exit" on 2> $data
|
|
1962
|
+ --radiolist $"Choose an operation:" 13 70 5 \
|
|
1963
|
+ 1 $"Enable or disable Wifi" off \
|
|
1964
|
+ 2 $"Configure wifi networks" off \
|
|
1965
|
+ 3 $"Manually edit wifi networks file" off \
|
|
1966
|
+ 4 $"Hotspot settings" off \
|
|
1967
|
+ 5 $"Exit" on 2> $data
|
1952
|
1968
|
sel=$?
|
1953
|
1969
|
case $sel in
|
1954
|
1970
|
1) break;;
|
1955
|
1971
|
255) break;;
|
1956
|
1972
|
esac
|
1957
|
1973
|
case $(cat $data) in
|
1958
|
|
- 1) wifi_settings;;
|
1959
|
|
- 2) editor $WIFI_NETWORKS_FILE;;
|
1960
|
|
- 3) hotspot_settings;;
|
1961
|
|
- 4) break;;
|
|
1974
|
+ 1) wifi_enable;;
|
|
1975
|
+ 2) wifi_settings;;
|
|
1976
|
+ 3) editor $WIFI_NETWORKS_FILE;;
|
|
1977
|
+ 4) hotspot_settings;;
|
|
1978
|
+ 5) break;;
|
1962
|
1979
|
esac
|
1963
|
1980
|
done
|
1964
|
1981
|
}
|