diff --git a/root_file_system/default/etc/bat-hosts b/root_file_system/default/etc/bat-hosts deleted file mode 100644 index cdd3e37..0000000 --- a/root_file_system/default/etc/bat-hosts +++ /dev/null @@ -1,20 +0,0 @@ -06:21:91:2c:f3:09 Batman_TimWZ -00:21:91:2c:f3:09 Node_TimWZ -06:1e:58:c7:07:e5 Batman_TimKU -00:1e:58:c7:07:e5 Node_TimKU -06:22:b0:98:70:df Batman_FreWZ -00:22:b0:98:70:df Node_FreWZ -06:1e:58:b9:d4:39 Batman_FreKU -00:1e:58:b9:d4:39 Node_FreKU -06:18:84:80:83:8d Batman_BjoFON -00:18:84:80:83:8d Node_BjoFON -06:22:B0:96:7C:D7 Batman_BjoDIR -00:22:B0:96:7C:D7 Node_BjoDIR -06:18:84:81:73:21 Batman_BjoBalk -00:18:84:81:73:21 Node_BjoBalk -0A:24:01:17:B7:55 Batman_floh1111_dir300 -00:24:01:17:B7:55 Node_floh1111_dir300 -00:13:e8:ab:47:49 Client_RedLap -1c:4b:d6:b8:17:dc Client_Freddy -00:16:6F:47:51:AA Client_floh1111 -00:80:48:3b:ab:0e Client_Bjo diff --git a/root_file_system/default/etc/configurator.sh b/root_file_system/default/etc/configurator.sh index 8bd4132..1214286 100644 --- a/root_file_system/default/etc/configurator.sh +++ b/root_file_system/default/etc/configurator.sh @@ -141,7 +141,14 @@ autoadd_ipv6_address() { echo "`date`: The IPv6 address of the router $CRAWL_ROUTER_ID has been added to the router in Netmon" >> $SCRIPT_LOGFILE echo "`date`: IPv6 Autoadd has been disabled cause it is no longer necesarry" >> $SCRIPT_LOGFILE else - echo "`date`: The IPv6 address already exists in Netmon on router `echo $ergebnis| cut '-d,' -f3`)" >> $SCRIPT_LOGFILE + if [ `echo $ergebnis| cut '-d,' -f3` == "$CRAWL_ROUTER_ID" ]; then + echo "`date`: The IPv6 address already exists in Netmon on this router. Maybe because of a previos assignment" >> $SCRIPT_LOGFILE + uci set configurator.@netmon[0].autoadd_ipv6_address='0' + uci commit + echo "`date`: IPv6 Autoadd has been disabled cause it is no longer necesarry" >> $SCRIPT_LOGFILE + else + echo "`date`: The IPv6 address already exists in Netmon on another router `echo $ergebnis| cut '-d,' -f3`" >> $SCRIPT_LOGFILE + fi fi } diff --git a/root_file_system/default/etc/hostsupdate.sh b/root_file_system/default/etc/hostsupdate.sh index cb30c85..8a1955f 100644 --- a/root_file_system/default/etc/hostsupdate.sh +++ b/root_file_system/default/etc/hostsupdate.sh @@ -1,3 +1,3 @@ #!/bin/sh -wget -T15 http://[`uci get configurator.@api[0].ipv6_address`%`uci get configurator.@api[0].ipv6_interface`]/api_nodewatcher.php?section=get_hostnames_and_mac -O - | grep -v -e "^..-..-" | sort -u > /etc/bat-hosts +wget -T15 http://[`uci get configurator.@api[0].ipv6_address`%`uci get configurator.@api[0].ipv6_interface`]/api_nodewatcher.php?section=get_hostnames_and_mac -O - | grep -v -e "^..-..-" | sort -u > /tmp/bat-hosts diff --git a/root_file_system/default/etc/nodewatcher.sh b/root_file_system/default/etc/nodewatcher.sh index d609075..332d6e2 100755 --- a/root_file_system/default/etc/nodewatcher.sh +++ b/root_file_system/default/etc/nodewatcher.sh @@ -156,7 +156,7 @@ crawl() { echo "`date`: Collecting information from batman advanced and it´s interfaces" >> $SCRIPT_LOGFILE fi #B.A.T.M.A.N. advanced - mv /etc/bat-hosts /etc/bat-hosts.tmp + mv /tmp/bat-hosts /tmp/bat-hosts.tmp if which batctl >/dev/null; then batman_check_running=`batctl if | grep 'Error'` if [ "$batman_check_running" == "" ]; then @@ -199,7 +199,7 @@ crawl() { fi fi fi - mv /etc/bat-hosts.tmp /etc/bat-hosts + mv /tmp/bat-hosts.tmp /tmp/bat-hosts if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then echo "`date`: Collecting information about conected clients" >> $SCRIPT_LOGFILE