forked from freifunk-franken/firmware
Fonera: restore accidentally overwritten fonera mac fixes
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
72b79cfb8c
commit
ef071d695b
|
@ -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,28 +35,20 @@ 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
|
||||
|
||||
# Starting NTP-Client Daemon
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user