diff options
author | Lassulus <Lassulus@googlemail.com> | 2011-05-26 15:53:04 +0200 |
---|---|---|
committer | Lassulus <Lassulus@googlemail.com> | 2011-05-26 15:53:04 +0200 |
commit | f56613952b89729e8b7d4d17fb0816e649a0ecd0 (patch) | |
tree | 72371f92870fd39e8410fc073fc548560c6d3d69 | |
parent | c7b41b910f5b876bac7a82366a6c1b27fd52bd72 (diff) | |
parent | 6197a76a6aee4b49afe951291f46fb3318188f30 (diff) |
Merge branch 'master' of github.com:miefda/retiolum
-rwxr-xr-x | hosts/.scripts/adv_graphgen/parse.py | 12 | ||||
-rw-r--r-- | hosts/.scripts/autostart/Makefile | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | hosts/.scripts/autostart/tinc | 2 | ||||
-rw-r--r-- | hosts/Lassulus | 1 | ||||
-rw-r--r-- | hosts/alphalabs | 1 | ||||
-rw-r--r-- | hosts/miefda901 | 1 | ||||
-rw-r--r-- | hosts/supernode | 2 |
7 files changed, 17 insertions, 5 deletions
diff --git a/hosts/.scripts/adv_graphgen/parse.py b/hosts/.scripts/adv_graphgen/parse.py index 27fe3a99..04b42c33 100755 --- a/hosts/.scripts/adv_graphgen/parse.py +++ b/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, @@ -35,23 +36,28 @@ def merge_edges(nodes): def write_node(k,v): - """ writes a single node and its edges """ + """ writes a single node and its edges + edges are weightet with the informations inside the nodes provided by + tinc + """ node = " "+k+"[label=\"" node += k+"\\l" 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 += "]" print (node) for con in v.get('to',[]): - edge = " "+k+ " -> " +con['name'] + "[weight="+str(10/float(con['weight'])) + edge = " "+k+ " -> " +con['name'] + "[weight="+str(float(con['weight'])) if con.get('bidirectional',False): edge += ",dir=both" edge += "]" print edge + def parse_input(): nodes={} for line in sys.stdin: diff --git a/hosts/.scripts/autostart/Makefile b/hosts/.scripts/autostart/Makefile index 58bfc0c5..7ca589e1 100644 --- a/hosts/.scripts/autostart/Makefile +++ b/hosts/.scripts/autostart/Makefile @@ -1,7 +1,8 @@ -INIT_FOLDER=/etc/rc.d +INIT_FOLDER=/etc/init.d .phony: all all: #TODO change the tinc file before writing cp tinc $(INIT_FOLDER)/tinc + chmod +x $(INIT_FOLDER)/tinc echo "retiolum" > /etc/tinc/nets.boot update-rc.d tinc defaults diff --git a/hosts/.scripts/autostart/tinc b/hosts/.scripts/autostart/tinc index 06d10403..12e77d6a 100644..100755 --- a/hosts/.scripts/autostart/tinc +++ b/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 diff --git a/hosts/Lassulus b/hosts/Lassulus index 803fe696..5d2c3adc 100644 --- a/hosts/Lassulus +++ b/hosts/Lassulus @@ -1,3 +1,4 @@ +Address = 10.9.9.74 Subnet = 10.7.7.11 Subnet = 42:23:5:11:0:0:0:0/64 -----BEGIN RSA PUBLIC KEY----- diff --git a/hosts/alphalabs b/hosts/alphalabs index 6aea1dec..80c0ef6e 100644 --- a/hosts/alphalabs +++ b/hosts/alphalabs @@ -1,3 +1,4 @@ +Address = 10.9.9.10 Subnet = 10.7.7.10 -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAvUAbMmmOFn+4kOvJAvmi0R/XCQa1YBlkjUvC6Pmt0Q8gV1DodXjB diff --git a/hosts/miefda901 b/hosts/miefda901 index a1b59a29..b9a9156a 100644 --- a/hosts/miefda901 +++ b/hosts/miefda901 @@ -1,4 +1,5 @@ Subnet = 10.7.7.22 +Subnet = 42:23:5:22:0:0:0:0/64 -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEApbEYmHf0vEDYa/2aVvWVxEGgC+JJlXcArdxkQooSIpnZfSAfsH0S MFz8v7UkM7EJSwDsFWf+gxyoAORdFpdQm+XQoDqWVZ1e0isYtNluP2C/51s3lu2F diff --git a/hosts/supernode b/hosts/supernode index 6444fe99..f730ca86 100644 --- a/hosts/supernode +++ b/hosts/supernode @@ -1,6 +1,6 @@ Address = miefda.org Subnet = 10.7.7.1 - +Subnet = 42:23:5:1:0:0:0:0/64 -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAr3DlBmQxP9UTBCkohK8FCYSk2td4Ov5lQYvC3Adx04lEWHfp+0nP sShYqqN9Aj3iCqj/DHx5jGuSqjyTmmFWIOMM9IwKMo2Oiz/PcBM56N6gzIHuR5wj |