From aea8e374caa9ba8cbb1bc3cff39753fbfe0e3605 Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Thu, 26 May 2011 13:59:47 +0200 Subject: fixed borken parse script wrong behaviour when we do not know the internal ip of a node for some reason. fixed autostart script to modprobe tun before continuning --- retiolum/hosts/.scripts/adv_graphgen/parse.py | 4 +++- retiolum/hosts/.scripts/autostart/tinc | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 retiolum/hosts/.scripts/autostart/tinc diff --git a/retiolum/hosts/.scripts/adv_graphgen/parse.py b/retiolum/hosts/.scripts/adv_graphgen/parse.py index b0534d93..04b42c33 100755 --- a/retiolum/hosts/.scripts/adv_graphgen/parse.py +++ b/retiolum/hosts/.scripts/adv_graphgen/parse.py @@ -1,4 +1,5 @@ #!/usr/bin/python2 +# -*- coding: utf8 -*- import sys """ TODO: Refactoring needed to pull the edges out of the node structures again, @@ -44,7 +45,8 @@ def write_node(k,v): node += "external:"+v['external-ip']+":"+v['external-port']+"\\l" if v.has_key('num_conns'): node += "Num Connects:"+str(v['num_conns'])+"\\l" - node += "internal:"+v['internal-ip']+"\\l\"" + + node += "internal:"+v.get('internal-ip','¯\\\\(°_o)/¯')+"\\l\"" if v['external-ip'] == "MYSELF": node += ",fillcolor=steelblue1" node += "]" diff --git a/retiolum/hosts/.scripts/autostart/tinc b/retiolum/hosts/.scripts/autostart/tinc old mode 100644 new mode 100755 index 06d10403..12e77d6a --- a/retiolum/hosts/.scripts/autostart/tinc +++ b/retiolum/hosts/.scripts/autostart/tinc @@ -25,6 +25,8 @@ TCONF="/etc/tinc" NETSFILE="$TCONF/nets.boot" NETS="" +modprobe tun + test -f $DAEMON || exit 0 [ -r /etc/default/tinc ] && . /etc/default/tinc -- cgit v1.2.3