firmware/bsp/default/root_file_system/etc/downup.sh
Tim Niemeyer b4d756cb91 New build_script structure.
The new build_script uses a bsp-style interface. Now it's possible
to work on more than one board at the same time. Just select the
selected_bsp with the build_script and start over.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2012-09-29 18:58:44 +02:00

20 lines
508 B
Bash

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