Fix bug that constantly changes ssid. Only create "merlin-xxxx" Wi-Fi automatically if /etc/Merlin is present.

merlin
cyoung 2017-10-12 12:53:53 -04:00
rodzic 97a72f91b9
commit 9a5a5320f3
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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