[PATCH 1/2] Tunnelaufbau erst, wenn Position und Kontakt Adresse gesetzt.
Christoph
suepke.christoph at gmail.com
Di Mär 22 00:04:07 CET 2016
Signed-off-by: Christoph <suepke.christoph at gmail.com>
---
bsp/default/root_file_system/etc/fastdstart.sh.tpl | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/bsp/default/root_file_system/etc/fastdstart.sh.tpl b/bsp/default/root_file_system/etc/fastdstart.sh.tpl
index 5bb5165..56f5eda 100755
--- a/bsp/default/root_file_system/etc/fastdstart.sh.tpl
+++ b/bsp/default/root_file_system/etc/fastdstart.sh.tpl
@@ -13,10 +13,20 @@ if [ "$SERVER" = "no" ]; then
test -f /tmp/started || exit
fi
-# Only do something with fastd when the router has internet connection
+# Only do something with fastd when the router has internet connection and is configured
+
+uci get system. at system[0].latitude
+lat=$?
+uci get system. at system[0].longitude
+lon=$?
+uci get system. at system[0].contact
+mail=$?
+
+
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
+ ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null ||
+ [ $lat -eq 0 ] && [ $lon -eq 0 ] && [ $mail -eq 0 ]; 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)
--
1.9.1
Mehr Informationen über die Mailingliste franken-dev