diff --git a/root_file_system/default/etc/configurator.sh b/root_file_system/default/etc/configurator.sh index 708746f..4c609fd 100644 --- a/root_file_system/default/etc/configurator.sh +++ b/root_file_system/default/etc/configurator.sh @@ -20,14 +20,11 @@ if [ -f /etc/config/configurator ];then CRAWL_NICKNAME=`uci get configurator.@crawl[0].nickname` CRAWL_PASSWORD=`uci get configurator.@crawl[0].password` UPDATE_AUTOUPDATE=`uci get configurator.@update[0].autoupdate` - MESH_INTERFACE=`uci get configurator.@network[0].mesh_interface` - CLIENT_INTERFACES=`uci get configurator.@network[0].client_interfaces` AUTOADD_IPV6_ADDRESS=`uci get configurator.@netmon[0].autoadd_ipv6_address` else . $SCRIPT_DIR/configurator_config fi - API_RETRY=$(($API_RETRY - 1)) get_url() { diff --git a/root_file_system/default/etc/nodewatcher.sh b/root_file_system/default/etc/nodewatcher.sh index f817756..a4ae9e1 100755 --- a/root_file_system/default/etc/nodewatcher.sh +++ b/root_file_system/default/etc/nodewatcher.sh @@ -20,23 +20,6 @@ else . $SCRIPT_DIR/nodewatcher_config fi -#Set default values if nothing is set -if [ -n $API_TIMEOUT ]; then - API_TIMEOUT="5" -fi -if [ -n $API_RETRY ]; then - API_RETRY="5" -fi -if [ -n $MESH_INTERFACE ]; then - MESH_INTERFACE="br-mesh" -fi -if [ -n $CLIENT_INTERFACES ]; then - CLIENT_INTERFACES="ath0 wlan0" -fi -if [ -n $SCRIPT_SYNC_HOSTNAME ]; then - SCRIPT_SYNC_HOSTNAME="1" -fi - API_RETRY=$(($API_RETRY - 1)) delete_log() { @@ -299,21 +282,8 @@ crawl() { DATA="$SYSTEM_DATA$INTERFACE_DATA$BATMAN_ADV_INTERFACES$BATMAN_ADV_ORIGINATORS$CLIENT_DATA" - #Send system data + #write data to hxml file that provides the data on httpd echo $DATA > /tmp/node.data - if [[ $SCRIPT_SYNC_HOSTNAME = "1" ]]; then - netmon_hostname="`echo $api_return | cut '-d;' -f2`" - if [ "$netmon_hostname" != "" ]; then - if [ "$netmon_hostname" != "`cat /proc/sys/kernel/hostname`" ]; then - if [ $error_level -gt "1" ]; then - echo "`date`: Setze neuen Hostname (Hostname synchronisation)" >> $logfile - fi - uci set system.@system[0].hostname=$netmon_hostname - uci commit - echo $netmon_hostname > /proc/sys/kernel/hostname - fi - fi - fi } LANG=C diff --git a/root_file_system/wr1043nd/etc/config/network b/root_file_system/wr1043nd/etc/config/network index 3024458..af1b4fc 100644 --- a/root_file_system/wr1043nd/etc/config/network +++ b/root_file_system/wr1043nd/etc/config/network @@ -4,7 +4,7 @@ config 'interface' 'loopback' option 'ipaddr' '127.0.0.1' option 'netmask' '255.0.0.0' -config 'interface' 'wlanmesch' +config 'interface' 'wlanmesh' option 'ifname' 'wlan1' option 'mtu' '1528' diff --git a/root_file_system/wr1043nd/etc/config/wireless b/root_file_system/wr1043nd/etc/config/wireless index a8f2879..7b601ba 100644 --- a/root_file_system/wr1043nd/etc/config/wireless +++ b/root_file_system/wr1043nd/etc/config/wireless @@ -11,7 +11,7 @@ config wifi-device radio0 config wifi-iface option device radio0 - option network wlan + option network wlanmesh option mode adhoc option bssid '02:CA:FF:EE:BA:BE' option ssid 'batman.oldenburg.freifunk.net' @@ -20,6 +20,6 @@ config wifi-iface config wifi-iface option device radio0 - option network wlan + option network mesh option mode ap option ssid 'oldenburg.freifunk.net' \ No newline at end of file diff --git a/root_file_system/wr1043nd/etc/crontabs/root b/root_file_system/wr1043nd/etc/crontabs/root index 05045a2..8f6ca8b 100644 --- a/root_file_system/wr1043nd/etc/crontabs/root +++ b/root_file_system/wr1043nd/etc/crontabs/root @@ -17,9 +17,4 @@ #* * * * * /usr/sbin/ff_olsr_test_gw #*/5 * * * * /usr/sbin/ff_olsr_watchdog #0 */4 * * * /usr/sbin/ff_rdate -#17 * * * * /usr/sbin/ff_mapupdate - -#Fix only for WR1043ND because wlan0 is not added after bootup -*/5 * * * * brctl addif br-mesh wlan0 -#Fix only for WR1043ND because mtu of wlan1 is not set bootup -*/5 * * * * ifconfig wlan1 mtu 1527 +#17 * * * * /usr/sbin/ff_mapupdate \ No newline at end of file diff --git a/root_file_system/wr1043nd/etc/rc.local b/root_file_system/wr1043nd/etc/rc.local index 9c4b4cc..a3303bf 100755 --- a/root_file_system/wr1043nd/etc/rc.local +++ b/root_file_system/wr1043nd/etc/rc.local @@ -8,6 +8,9 @@ SOFTWARE_MACADDR=`uci get wireless.@wifi-device[0].macaddr` if [[ "$HARDWARE_MACADDR" != "$SOFTWARE_MACADDR" ]]; then uci set wireless.@wifi-device[0].macaddr=$HARDWARE_MACADDR uci commit + #wait before reboot to generate tinc certificates and to be able + #to login over ssh bevore reboot in case of errors + sleep 30 reboot fi diff --git a/root_file_system/wr741nd/etc/config/network b/root_file_system/wr741nd/etc/config/network index d3f94f6..8606f87 100644 --- a/root_file_system/wr741nd/etc/config/network +++ b/root_file_system/wr741nd/etc/config/network @@ -4,7 +4,7 @@ config 'interface' 'loopback' option 'ipaddr' '127.0.0.1' option 'netmask' '255.0.0.0' -config 'interface' 'wlanmesch' +config 'interface' 'wlanmesh' option 'ifname' 'wlan1' option 'mtu' '1528' diff --git a/root_file_system/wr741nd/etc/config/wireless b/root_file_system/wr741nd/etc/config/wireless index 330c9ed..5aea270 100644 --- a/root_file_system/wr741nd/etc/config/wireless +++ b/root_file_system/wr741nd/etc/config/wireless @@ -13,7 +13,7 @@ config wifi-device radio0 config wifi-iface option device radio0 - option network wlan + option network wlanmesh option mode adhoc option bssid '02:CA:FF:EE:BA:BE' option ssid 'batman.oldenburg.freifunk.net' @@ -24,7 +24,7 @@ config wifi-iface config wifi-iface option device radio0 - option network wlan + option network mesh option mode ap option ssid 'oldenburg.freifunk.net' option 'encryption' 'none' diff --git a/root_file_system/wr741nd/etc/crontabs/root b/root_file_system/wr741nd/etc/crontabs/root index 05045a2..8f6ca8b 100644 --- a/root_file_system/wr741nd/etc/crontabs/root +++ b/root_file_system/wr741nd/etc/crontabs/root @@ -17,9 +17,4 @@ #* * * * * /usr/sbin/ff_olsr_test_gw #*/5 * * * * /usr/sbin/ff_olsr_watchdog #0 */4 * * * /usr/sbin/ff_rdate -#17 * * * * /usr/sbin/ff_mapupdate - -#Fix only for WR1043ND because wlan0 is not added after bootup -*/5 * * * * brctl addif br-mesh wlan0 -#Fix only for WR1043ND because mtu of wlan1 is not set bootup -*/5 * * * * ifconfig wlan1 mtu 1527 +#17 * * * * /usr/sbin/ff_mapupdate \ No newline at end of file diff --git a/root_file_system/wr741nd/etc/rc.local b/root_file_system/wr741nd/etc/rc.local index f933cb3..a3303bf 100755 --- a/root_file_system/wr741nd/etc/rc.local +++ b/root_file_system/wr741nd/etc/rc.local @@ -8,6 +8,8 @@ SOFTWARE_MACADDR=`uci get wireless.@wifi-device[0].macaddr` if [[ "$HARDWARE_MACADDR" != "$SOFTWARE_MACADDR" ]]; then uci set wireless.@wifi-device[0].macaddr=$HARDWARE_MACADDR uci commit + #wait before reboot to generate tinc certificates and to be able + #to login over ssh bevore reboot in case of errors sleep 30 reboot fi