From 57db955ee501d0c27ba7d9e613bf96271f847017 Mon Sep 17 00:00:00 2001 From: Oliver Voelker Date: Mon, 10 Nov 2014 16:01:48 +0100 Subject: [PATCH] configure all hosts for our ping test in the header ;) --- bsp/default/root_file_system/etc/fastdstart.sh.tpl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bsp/default/root_file_system/etc/fastdstart.sh.tpl b/bsp/default/root_file_system/etc/fastdstart.sh.tpl index 46c0e09..7f0f75c 100755 --- a/bsp/default/root_file_system/etc/fastdstart.sh.tpl +++ b/bsp/default/root_file_system/etc/fastdstart.sh.tpl @@ -5,17 +5,18 @@ SERVER="no" project="${VPN_PROJECT}" -test_internet_host1="mastersword.de" -test_internet_host2="109.163.229.254" +test_ipv4_host1="mastersword.de" +test_ipv4_host2="109.163.229.254" +test_ipv6_host1="heise.de" if [ "$SERVER" = "no" ]; then test -f /tmp/started || exit fi -#Only do something with fastd when the router has internet connection -if ping -w5 -c3 "$test_internet_host1" &>/dev/null || - ping -w5 -c3 "$test_internet_host2" &>/dev/null || - ping6 -w5 -c3 heise.de &>/dev/null; then +# Only do something with fastd when the router has internet connection +if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null || + ping -w5 -c3 "$test_ipv4_host2" &>/dev/null || + ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null; then mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null) if [ "$SERVER" = "no" ]; then hostname=$(cat /proc/sys/kernel/hostname)