Initial wifi networks file comments

This commit is contained in:
Bob Mottram 2016-04-27 19:30:31 +01:00
parent d1ac3cddad
commit 066aa18ff5
2 changed files with 22 additions and 3 deletions

View File

@ -1704,10 +1704,19 @@ function wifi_edit_networks {
if [ -f /etc/hostapd/hostapd.conf ]; then
return
fi
editor $WIFI_NETWORKS_FILE
if [ -f $WIFI_NETWORKS_FILE ]; then
${PROJECT_NAME}-wifi --networks $WIFI_NETWORKS_FILE
if [ ! -f $WIFI_NETWORKS_FILE ]; then
echo $'# Add wifi networks as follows:' > $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
echo $'# MySSID' >> $WIFI_NETWORKS_FILE
echo $'# wpa2-psk' >> $WIFI_NETWORKS_FILE
echo $'# myWifiPassphrase' >> $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
echo $'# AnotherSSID' >> $WIFI_NETWORKS_FILE
echo $'# none' >> $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
fi
editor $WIFI_NETWORKS_FILE
${PROJECT_NAME}-wifi --networks $WIFI_NETWORKS_FILE
}
function hotspot_settings {

View File

@ -264,6 +264,16 @@ function networks_from_file {
function create_networks_interactive {
if [ -f $WIFI_NETWORKS_FILE ]; then
rm $WIFI_NETWORKS_FILE
echo $'# Add wifi networks as follows:' > $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
echo $'# MySSID' >> $WIFI_NETWORKS_FILE
echo $'# wpa2-psk' >> $WIFI_NETWORKS_FILE
echo $'# myWifiPassphrase' >> $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
echo $'# AnotherSSID' >> $WIFI_NETWORKS_FILE
echo $'# none' >> $WIFI_NETWORKS_FILE
echo '#' >> $WIFI_NETWORKS_FILE
fi
wifi_ctr=0