2012-01-10 19:06:45 +01:00
|
|
|
# Put your custom commands here that should be executed once
|
|
|
|
# the system init finished. By default this file does nothing.
|
|
|
|
|
|
|
|
# batman seems to be to stupid to regocnice the devices
|
|
|
|
# todo: uci.get ..
|
|
|
|
batctl if add eth0.3
|
|
|
|
batctl if add eth0.4
|
|
|
|
batctl if add wlan0-1
|
|
|
|
|
|
|
|
ifconfig eth0 mtu 1528
|
|
|
|
ifconfig eth0.3 mtu 1528
|
|
|
|
ifconfig eth0.4 mtu 1528
|
|
|
|
|
2012-01-15 21:16:58 +01:00
|
|
|
#echo none > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:rx/trigger
|
|
|
|
#echo phy0tx > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:tx/trigger
|
2012-01-10 19:06:45 +01:00
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
|
|
|
# todo: all devices or only dir300 ?
|
|
|
|
BRMAC=`ip link | grep br-mesh -A1 | grep link | awk '{ print $2 }'`
|
|
|
|
BRMAC=`toLower $BRMAC`
|
|
|
|
WLMAC=`ip link | grep wlan0 -A1 | grep link | awk '{ print $2 }'`
|
|
|
|
WLMAC=`toLower $WLMAC`
|
|
|
|
ETMAC=`ip link | grep eth0 -A1 | grep link | awk '{ print $2 }'`
|
|
|
|
ETMAC=`toLower $ETMAC`
|
|
|
|
|
|
|
|
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" = "$ETMAC" ]; then
|
|
|
|
if [[ "$BRMAC" != "$WLMAC" ]]; then
|
|
|
|
logger -s "Fixing wrong MAC on br-mesh"
|
|
|
|
uci set network.mesh.macaddr=$WLMAC
|
|
|
|
uci commit
|
|
|
|
ifconfig br-mesh hw ether $WLMAC
|
|
|
|
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
|
|
|
|
|
2012-01-15 21:16:13 +01:00
|
|
|
# Starting NTP-Client Daemon
|
2012-09-23 01:46:31 +02:00
|
|
|
# uses to much ram
|
|
|
|
#ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
2012-01-10 19:06:45 +01:00
|
|
|
|
|
|
|
sh /etc/firewall.user
|
|
|
|
|
|
|
|
/etc/init.d/qos disable
|
|
|
|
/etc/init.d/qos stop
|
|
|
|
|
|
|
|
#busybox-httpd for crawldata
|
2012-01-15 20:33:19 +01:00
|
|
|
mkdir /tmp/crawldata
|
|
|
|
httpd -h /tmp/crawldata
|
2012-01-10 19:06:45 +01:00
|
|
|
|
|
|
|
sh /etc/configurator.sh
|
|
|
|
|
|
|
|
exit 0
|