Add workaround for bridge fuckup

This commit is contained in:
floh1111 2012-03-24 16:28:17 +00:00
parent 923917891a
commit bbe54431f1
2 changed files with 24 additions and 0 deletions

View File

@ -104,6 +104,11 @@ assign_router() {
echo "`date`: The list of not assigned routers has been updated. Exiting" >> $SCRIPT_LOGFILE
exit 0
fi
else
if [ $SCRIPT_ERROR_LEVEL -gt "0" ]; then
echo "`date`: An unknown error occured" >> $SCRIPT_LOGFILE
exit 0
fi
fi
if [ $SCRIPT_ERROR_LEVEL -gt "0" ]; then
echo "`date`: The router has not been assigned to a router in Netmon" >> $SCRIPT_LOGFILE

View File

@ -0,0 +1,19 @@
ipv6_link_local_addr="`ifconfig br-mesh | grep 'inet6 addr:' | grep 'Scope:Link' | awk '{ print $3}'`"
ipv6_link_local_addr="`echo $ipv6_link_local_addr | cut -d/ -f1`"
ping_result="`ping6 -I br-mesh $ipv6_link_local_addr`"
ping_result="`echo $ping_result | grep 'bad address'`"
ping_result="`$ping_result | awk '{ print $2}'`"
echo $ping_result
if [ "$ping_result"=="ping6\: sendto\: Cannot assign requested address" ]; then
echo "down"
ifconfig br-mesh down
ifconfig br-mesh up
else
echo "up"
fi