diff --git a/bsp/fonera/root_file_system/etc/rc.local b/bsp/fonera/root_file_system/etc/rc.local index c7276f6..1ddfa10 100755 --- a/bsp/fonera/root_file_system/etc/rc.local +++ b/bsp/fonera/root_file_system/etc/rc.local @@ -14,6 +14,15 @@ toLower() { echo $1 | sed -e "s/A/a/g" -e "s/B/b/g" -e "s/C/c/g" -e "s/D/d/g" -e "s/E/e/g" -e "s/F/f/g" } +#. /etc/firewall.user + +#busybox-httpd for crawldata +mkdir /tmp/crawldata +httpd -h /tmp/crawldata + +# fonera to slow? +sleep 10 + # todo: all devices or only dir300 ? if uci get network.mesh.macaddr then @@ -26,17 +35,15 @@ else ETMAC=`ip link | grep eth0 -A1 | grep link | awk '{ print $2 }'` ETMAC=`toLower $ETMAC` - if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" = "$ETMAC" ]; then - if [[ "$BRMAC" != "$WLMAC" ]]; then + if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" != "$ETMAC" ]; then echo "Fixing wrong MAC on br-mesh" - uci set network.mesh.macaddr=$WLMAC + uci set network.mesh.macaddr=$ETMAC uci commit - ifconfig br-mesh hw ether $WLMAC + ifconfig br-mesh hw ether $ETMAC ifconfig br-mesh down ifconfig br-mesh up #wait before reboot to generate tinc certificates and to be able #to login over ssh bevore reboot in case of errors - fi fi fi @@ -44,10 +51,4 @@ fi # uses to much ram #ntpd -p "fe80::201:2ff:fe03:405%br-mesh" -#. /etc/firewall.user - -#busybox-httpd for crawldata -mkdir /tmp/crawldata -httpd -h /tmp/crawldata - exit 0