2017-11-24 16:57:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# put initialization that needs to happen at every startup for IIAB here
|
|
|
|
|
|
|
|
if [ ! -f /etc/iiab/uuid ]; then
|
|
|
|
uuidgen > /etc/iiab/uuid
|
|
|
|
fi
|
|
|
|
|
2018-01-11 04:04:17 +00:00
|
|
|
# Temporary promiscuous-mode workaround for RPi's WiFi "10SEC disease"
|
|
|
|
# Set wlan0 to promiscuous on boot if needed as gateway (i.e. AP's OFF)
|
|
|
|
# Scripts iiab-hotspot-on + iiab-hotspot-off SHOULD toggle this boot flag!
|
2018-01-05 04:53:39 +00:00
|
|
|
# https://github.com/iiab/iiab/issues/638#issuecomment-355455454
|
2018-01-11 18:51:22 +00:00
|
|
|
if [[ $(grep -i raspbian /etc/*release) &&
|
2018-01-11 04:29:32 +00:00
|
|
|
#($(grep "hostapd_enabled = False" /etc/iiab/config_vars.yml) ||
|
|
|
|
#((! $(grep "hostapd_enabled = True" /etc/iiab/config_vars.yml)) &&
|
2018-01-11 18:48:27 +00:00
|
|
|
$(grep "^hostapd_enabled = False" /etc/iiab/iiab.ini) ]];
|
2018-01-11 04:29:32 +00:00
|
|
|
#)
|
|
|
|
#)
|
2018-01-11 18:48:27 +00:00
|
|
|
#]];
|
2018-01-11 03:42:09 +00:00
|
|
|
then
|
|
|
|
ip link set dev wlan0 promisc on
|
|
|
|
fi
|
2018-01-05 04:53:39 +00:00
|
|
|
|
|
|
|
exit 0
|