From 9a5a5320f3044ed7a6b79af9546b4981f0057cc0 Mon Sep 17 00:00:00 2001 From: cyoung Date: Thu, 12 Oct 2017 12:53:53 -0400 Subject: [PATCH] Fix bug that constantly changes ssid. Only create "merlin-xxxx" Wi-Fi automatically if /etc/Merlin is present. --- image/stratux-wifi.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/image/stratux-wifi.sh b/image/stratux-wifi.sh index c716946e..4d07409b 100755 --- a/image/stratux-wifi.sh +++ b/image/stratux-wifi.sh @@ -49,7 +49,7 @@ function hostapd-upgrade { ##### End hostapd settings structure function function mac-ssid { - T=`grep '^merlin' $DAEMON_USER_PREF` + T=`grep '^ssid=merlin' $DAEMON_USER_PREF` if [ -z "$T" ] ; then # Need to "upgrade" the ssid. MAC=`ifconfig wlan0 | awk '/^[a-z]/ { iface=$1; mac=$NF; next } /inet addr:/ { print mac }' | cut -d: -f4,5 | sed -e 's/://'` @@ -106,7 +106,9 @@ if [ ! -f $DAEMON_USER_PREF ]; then hostapd-upgrade fi -mac-ssid +if [ -e /etc/Merlin ]; then + mac-ssid +fi # function to build /tmp/hostapd.conf and start AP ap-start