|
@@ -317,6 +317,8 @@ WIFI_PASSWORD=
|
317
|
317
|
|
318
|
318
|
# wifi interface
|
319
|
319
|
WIFI_INTERFACE="wlan0"
|
|
320
|
+WIFI_HOTSPOT_MODE="g"
|
|
321
|
+WIFI_HOTSPOT_CHANNEL=7
|
320
|
322
|
|
321
|
323
|
# message if something fails to install
|
322
|
324
|
CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
|
|
@@ -403,6 +405,12 @@ function read_configuration {
|
403
|
405
|
if grep -q "WIFI_INTERFACE" $CONFIGURATION_FILE; then
|
404
|
406
|
WIFI_INTERFACE=$(grep "WIFI_INTERFACE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
405
|
407
|
fi
|
|
408
|
+ if grep -q "WIFI_HOTSPOT_MODE" $CONFIGURATION_FILE; then
|
|
409
|
+ WIFI_HOTSPOT_MODE=$(grep "WIFI_HOTSPOT_MODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
|
410
|
+ fi
|
|
411
|
+ if grep -q "WIFI_HOTSPOT_CHANNEL" $CONFIGURATION_FILE; then
|
|
412
|
+ WIFI_HOTSPOT_CHANNEL=$(grep "WIFI_HOTSPOT_CHANNEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
|
413
|
+ fi
|
406
|
414
|
if grep -q "ENABLE_WIFI" $CONFIGURATION_FILE; then
|
407
|
415
|
ENABLE_WIFI=$(grep "ENABLE_WIFI" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
408
|
416
|
fi
|
|
@@ -7111,9 +7119,9 @@ function enable_wifi_hotspot {
|
7111
|
7119
|
echo '' >> /etc/hostapd/hostapd.conf
|
7112
|
7120
|
echo "ssid=$WIFI_ESSID" >> /etc/hostapd/hostapd.conf
|
7113
|
7121
|
echo '' >> /etc/hostapd/hostapd.conf
|
7114
|
|
- echo 'channel=3' >> /etc/hostapd/hostapd.conf
|
|
7122
|
+ echo "channel=${WIFI_HOTSPOT_CHANNEL}" >> /etc/hostapd/hostapd.conf
|
7115
|
7123
|
echo '' >> /etc/hostapd/hostapd.conf
|
7116
|
|
- echo 'hw_mode=n' >> /etc/hostapd/hostapd.conf
|
|
7124
|
+ echo "hw_mode=$WIFI_HOTSPOT_MODE" >> /etc/hostapd/hostapd.conf
|
7117
|
7125
|
echo '' >> /etc/hostapd/hostapd.conf
|
7118
|
7126
|
echo '# # Static WPA2 key configuration' >> /etc/hostapd/hostapd.conf
|
7119
|
7127
|
echo '# #1=wpa1, 2=wpa2, 3=both' >> /etc/hostapd/hostapd.conf
|