[PATCH 1/2] Tunnelaufbau erst, wenn Position und Kontakt Adresse gesetzt.

Tim Niemeyer tim at tn-x.org
Di Mär 22 07:55:18 CET 2016


Hi

Am 22. März 2016 00:04:07 MEZ, schrieb Christoph <suepke.christoph at gmail.com>:
>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

PingOk oder PingOk oder PingOk oder (lat gesetzt und lon gesetzt und mail gesetzt)

Wenn ich das richtig gelesen hab, willst du eigentlich (PingOk oder PingOk oder pingok ) und lat und lon und mail.

Mit dem Patch würde fastd gestartet, wenn die Config da ist aber kein Netz vorhanden ist.

Damit das ganze leserlich bleibt sollten die Verknüpfungen geklammert werden.

Tim

>	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)




Mehr Informationen über die Mailingliste franken-dev