From c00d41c85e4f0b5a7fad0dab7956425cee79a634 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 20:27:48 +0100 Subject: fix android bug --- retiolum/scripts/tinc_setup/new_install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4dc973d9..7dcc3a7b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,8 +163,8 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR=/usr/local/etc/tinc ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR=/data/secure/data ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi fi else if ! type tincd >/dev/null; then @@ -172,8 +172,8 @@ else exit 1 else TINCBIN=tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR=/etc/tinc ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR=/tmp/tinc-install-fu ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi fi fi -- cgit v1.2.3 From e6451bbd74b54702f09c7130348028f1a89b981c Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 21:04:58 +0100 Subject: fixed path on android --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 7dcc3a7b..9fa8a84b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,7 +163,7 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi fi else -- cgit v1.2.3 From fbcf1a5714a82d1f7eb6ca9d55625f0c910ee315 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 22:06:40 +0100 Subject: fixes for android --- retiolum/scripts/tinc_setup/new_install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 9fa8a84b..4552810d 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,8 +163,9 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi + mount -o remount,rw / fi else if ! type tincd >/dev/null; then -- cgit v1.2.3 From 83619a1e047518dbb3a13666bd97df196f9a978d Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 22:27:16 +0100 Subject: added seruundroid (moritz) --- retiolum/hosts/seruundroid | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 retiolum/hosts/seruundroid (limited to 'retiolum') diff --git a/retiolum/hosts/seruundroid b/retiolum/hosts/seruundroid new file mode 100644 index 00000000..660673fb --- /dev/null +++ b/retiolum/hosts/seruundroid @@ -0,0 +1,11 @@ +Subnet = 10.243.211.81 +Subnet = 42:d274:9187:9408:d5e7:05f2:ee07:9abd + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAryK+xseuc/kPjZb+uPyNiDDW4P9DVLTV/eGowHZrPcn6t7L5CUZp +jl4csKkfJs8TayM9edAitJvC3KWFmdZrV6L9LY1BmAGuJix4wr1WtdkxwC/cUUWE +I9bTqSTGrhSRxKRmO/xSB1za5oIfIQ6vnXZYXPaAFiOQj4B5m5qn79K+d3N3j3MX +BB8BEkQHNuuCTm3JIWTLT6ZSOGgKPCXnV9NR6WwdHS62SBntZQHaheirMQQ7AJAT +kiZTdrPnMap0Qm9xkMbttazgrfVNoOzCJRMOH5EyMEfc69CufOotgfJLg0Ki8aeJ +uY3wX/aLZz2HklVarvuk5gX5RqsmZXswFwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From 66979215f1cda8b3af4829b809222161714d430d Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 22:41:42 +0100 Subject: fixed device for android --- retiolum/scripts/tinc_setup/new_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4552810d..e67ec1c0 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -165,7 +165,8 @@ if [ $OS -eq 2 ]; then TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi - mount -o remount,rw / + mount -o remount,rw / + DEV="/dev/tun" fi else if ! type tincd >/dev/null; then @@ -175,6 +176,7 @@ else TINCBIN=tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi + DEV="/dev/net/tun" fi fi @@ -244,7 +246,7 @@ echo "Subnet = $IP6" >> hosts/$HOSTN cat>tinc.conf< Date: Mon, 21 Jan 2013 22:43:24 +0100 Subject: fixed whitespace --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e67ec1c0..18096e1f 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -165,7 +165,7 @@ if [ $OS -eq 2 ]; then TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi - mount -o remount,rw / + mount -o remount,rw / DEV="/dev/tun" fi else -- cgit v1.2.3 From 7d1d43e0267ab4ef9998d50a3076ebed5dc107a5 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 23 Jan 2013 17:37:05 +0100 Subject: more android fixes --- retiolum/scripts/tinc_setup/new_install.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 18096e1f..65611b1c 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -166,6 +166,7 @@ if [ $OS -eq 2 ]; then if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi mount -o remount,rw / + mount -o remount,rw /system DEV="/dev/tun" fi else @@ -305,6 +306,12 @@ else yes | $TINCBIN -n $NETNAME -K fi +if [ $OS -eq 2 ]; then + mkdir /etc/tinc + cd / + mv $TINCDIR/$NETNAME /etc/tinc/ + cd /etc/tinc/$NETNAME +fi #write to irc-channel NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" -- cgit v1.2.3 From 8cb674488f660b5c2e010769f0849092a1fbe661 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 23 Jan 2013 17:41:42 +0100 Subject: readded seruundroid (lost privkey) --- retiolum/hosts/seruundroid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/hosts/seruundroid b/retiolum/hosts/seruundroid index 660673fb..d880042c 100644 --- a/retiolum/hosts/seruundroid +++ b/retiolum/hosts/seruundroid @@ -1,4 +1,4 @@ -Subnet = 10.243.211.81 +ubnet = 10.243.211.81 Subnet = 42:d274:9187:9408:d5e7:05f2:ee07:9abd -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From 14ae58b1f8712c7db98c4b85e18fe632b9dd3a3d Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 23 Jan 2013 17:44:09 +0100 Subject: fixed wrong key --- retiolum/hosts/seruundroid | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'retiolum') diff --git a/retiolum/hosts/seruundroid b/retiolum/hosts/seruundroid index d880042c..b4f0848e 100644 --- a/retiolum/hosts/seruundroid +++ b/retiolum/hosts/seruundroid @@ -1,11 +1,12 @@ -ubnet = 10.243.211.81 -Subnet = 42:d274:9187:9408:d5e7:05f2:ee07:9abd +Subnet = 10.243.127.2 +Subnet = 42:81de:f850:152b:0988:1942:265d:dacb -----BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAryK+xseuc/kPjZb+uPyNiDDW4P9DVLTV/eGowHZrPcn6t7L5CUZp -jl4csKkfJs8TayM9edAitJvC3KWFmdZrV6L9LY1BmAGuJix4wr1WtdkxwC/cUUWE -I9bTqSTGrhSRxKRmO/xSB1za5oIfIQ6vnXZYXPaAFiOQj4B5m5qn79K+d3N3j3MX -BB8BEkQHNuuCTm3JIWTLT6ZSOGgKPCXnV9NR6WwdHS62SBntZQHaheirMQQ7AJAT -kiZTdrPnMap0Qm9xkMbttazgrfVNoOzCJRMOH5EyMEfc69CufOotgfJLg0Ki8aeJ -uY3wX/aLZz2HklVarvuk5gX5RqsmZXswFwIDAQAB +MIIBCgKCAQEAvNtSbaaacF05L2mAxxA5SYc6DuoZEAkXlhcvLTlpu9f/0vZwUWh7 +175pLn6VqUijVoFb9vyoOwkrs9Uk3aX8mYws+5yJLwXhIje+U3uiVTphowKva+m9 +BzV6waZ5dLbh+3CGimx1TBkFTly3NkdZs886QWSO4aXLdU6lt3jRYsuay0Eop/j0 +eQ0BWg9o0QEcfDRQ7RirXrD0B7TSo6qZC0b4NSAMHTE+dvOMo7c+Z7cIPNLS0B+T +Am7ju3gF7UU68kKPyczrNSPPPZayEvZYUZE4PHt8dyIsppojoRq0SJqsMr/mOC15 +dg/KnoKezn9nqUWzisRWrrqWStAKITJkjQIDAQAB -----END RSA PUBLIC KEY----- + -- cgit v1.2.3 From 0c1883da9a8667595c528130cb9ddc7b0c4a04b2 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 24 Jan 2013 02:12:00 +0000 Subject: find_super is now using a threadpool --- retiolum/scripts/adv_graphgen/find_super.py | 39 ++++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/adv_graphgen/find_super.py b/retiolum/scripts/adv_graphgen/find_super.py index df01734e..99548f1c 100644 --- a/retiolum/scripts/adv_graphgen/find_super.py +++ b/retiolum/scripts/adv_graphgen/find_super.py @@ -23,23 +23,32 @@ def find_super(path="/etc/tinc/retiolum/hosts"): if addrs : yield (f ,[(addr ,int(port)) for addr in addrs]) -def check_super(path="/etc/tinc/retiolum/hosts"): - from socket import socket,AF_INET,SOCK_STREAM - for host,addrs in find_super(path): +def try_connect(addr): + try: + from socket import socket,AF_INET,SOCK_STREAM + s = socket(AF_INET,SOCK_STREAM) + s.settimeout(2) + s.connect(addr) + s.settimeout(None) + s.close() + return addr + except Exception as e: + pass + #return () + +def check_one_super(ha): + host,addrs = ha valid_addrs = [] for addr in addrs: - try: - s = socket(AF_INET,SOCK_STREAM) - s.settimeout(3) - s.connect(addr) - #print("success connecting %s:%d"%(addr)) - s.settimeout(None) - s.close() - valid_addrs.append(addr) - except Exception as e: - pass - #print("cannot connect to %s:%d"%(addr)) - if valid_addrs: yield (host,valid_addrs) + ret = try_connect(addr) + if ret: valid_addrs.append(ret) + if valid_addrs: return (host,valid_addrs) + +def check_super(path="/etc/tinc/retiolum/hosts"): + from multiprocessing import Pool + p = Pool(20) + return filter(None,p.map(check_one_super,find_super(path))) + if __name__ == "__main__": -- cgit v1.2.3 From 55d7d06d41fc47d32e4c138cb5aa7127cfd4864b Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 24 Jan 2013 02:24:16 +0000 Subject: fix misleading function name in find_super --- retiolum/scripts/adv_graphgen/find_super.py | 8 ++++---- retiolum/scripts/adv_graphgen/parse_tinc_stats.py | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/adv_graphgen/find_super.py b/retiolum/scripts/adv_graphgen/find_super.py index 99548f1c..ae0fae8f 100644 --- a/retiolum/scripts/adv_graphgen/find_super.py +++ b/retiolum/scripts/adv_graphgen/find_super.py @@ -1,6 +1,6 @@ #!/usr/bin/python -def find_super(path="/etc/tinc/retiolum/hosts"): +def find_potential_super(path="/etc/tinc/retiolum/hosts"): import os import re @@ -44,10 +44,10 @@ def check_one_super(ha): if ret: valid_addrs.append(ret) if valid_addrs: return (host,valid_addrs) -def check_super(path="/etc/tinc/retiolum/hosts"): +def check_all_the_super(path="/etc/tinc/retiolum/hosts"): from multiprocessing import Pool p = Pool(20) - return filter(None,p.map(check_one_super,find_super(path))) + return filter(None,p.map(check_one_super,find_potential_super(path))) @@ -55,5 +55,5 @@ if __name__ == "__main__": """ usage """ - for host,addrs in check_super(): + for host,addrs in check_all_the_super(): print host,addrs diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py index 76a3ffcd..e5bd96a8 100755 --- a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py +++ b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py @@ -2,7 +2,7 @@ # -*- coding: utf8 -*- from BackwardsReader import BackwardsReader import sys,json -from find_super import check_super +from find_super import check_all_the_super try: from time import time import socket @@ -18,7 +18,7 @@ except Exception as e: sys.stderr.write("Cannot connect to graphite: %s\n" % str(e)) supernodes= [ ] -for supernode,addr in check_super(): +for supernode,addr in check_all_the_super(): supernodes.append(supernode) """ TODO: Refactoring needed to pull the edges out of the node structures again, it should be easier to handle both structures""" @@ -39,6 +39,7 @@ def write_digraph(nodes): for k,v in nodes.iteritems(): write_node(k,v) print ('}') + def dump_graph(nodes): from time import time graph = {} @@ -48,6 +49,7 @@ def dump_graph(nodes): json.dump(graph,f) f.write('\n') f.close() + def write_stat_node(nodes): ''' Write a `stats` node in the corner This node contains infos about the current number of active nodes and connections inside the network @@ -95,6 +97,7 @@ def generate_stats(nodes): v['avg_weight'] = get_node_avg_weight(conns) v['availability'] = get_node_availability(k,jlines) sys.stderr.write( "%s -> %f\n" %(k ,v['availability'])) + def get_node_avg_weight(conns): """ calculates the average weight for the given connections """ if not conns: @@ -143,6 +146,7 @@ def delete_unused_nodes(nodes): #del(new_nodes[k]) del(k) return new_nodes + def merge_edges(nodes): """ merge back and forth edges into one DESTRUCTS the current structure by deleting "connections" in the nodes -- cgit v1.2.3 From 3380e4d7cd0d22b228725d060b3a2b7cc0fa2678 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Jan 2013 10:22:40 +0100 Subject: Shepherd -> devstar --- retiolum/hosts/Shepherd | 11 ----------- retiolum/hosts/devstar | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 retiolum/hosts/Shepherd create mode 100644 retiolum/hosts/devstar (limited to 'retiolum') diff --git a/retiolum/hosts/Shepherd b/retiolum/hosts/Shepherd deleted file mode 100644 index 875f62e2..00000000 --- a/retiolum/hosts/Shepherd +++ /dev/null @@ -1,11 +0,0 @@ -Subnet = 10.243.0.133 -Subnet = 42:2be0:92f5:3546:5f0f:8f22:6244:25f4/128 - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAwkkmkhGMnI0x5VIgdLwV2SvXO9Bw3Sy1U5AToZiG2dSB+OiwwLir -JIrTHv4r73lMLROJjQhznq06VMmNviC82178H7/DZqgSqlGU7d9p1Okd5XCs6LI3 -eaL5mYTXFuA+PMHVvYqQ5fDQRQ4KoWmlSV65XUPejPlxtl3FXqOSHVuuBSbka+St -qLyWLAh9d8AfWjxbAIv41fl6WOyw2IuDc05K36aT/TwzA3ykl+ekNObAjvpI0cxI -+d3j8H8JY5jDcg1hvWT06JqpUcTJRkWLL7BBdQvWySaBcET1Flfo8eYVqVQDK4kU -XV/tA1ax7YPFBQ7Lh3Ru9nEC45Gv6R4HbwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/devstar b/retiolum/hosts/devstar new file mode 100644 index 00000000..875f62e2 --- /dev/null +++ b/retiolum/hosts/devstar @@ -0,0 +1,11 @@ +Subnet = 10.243.0.133 +Subnet = 42:2be0:92f5:3546:5f0f:8f22:6244:25f4/128 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAwkkmkhGMnI0x5VIgdLwV2SvXO9Bw3Sy1U5AToZiG2dSB+OiwwLir +JIrTHv4r73lMLROJjQhznq06VMmNviC82178H7/DZqgSqlGU7d9p1Okd5XCs6LI3 +eaL5mYTXFuA+PMHVvYqQ5fDQRQ4KoWmlSV65XUPejPlxtl3FXqOSHVuuBSbka+St +qLyWLAh9d8AfWjxbAIv41fl6WOyw2IuDc05K36aT/TwzA3ykl+ekNObAjvpI0cxI ++d3j8H8JY5jDcg1hvWT06JqpUcTJRkWLL7BBdQvWySaBcET1Flfo8eYVqVQDK4kU +XV/tA1ax7YPFBQ7Lh3Ru9nEC45Gv6R4HbwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From 721f01468e0a08cd145a9596208f196227ec55e3 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 28 Jan 2013 11:47:39 +0000 Subject: add geisha geisha is the host for streaming the s21-instacam to ustream --- retiolum/hosts/geisha | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 retiolum/hosts/geisha (limited to 'retiolum') diff --git a/retiolum/hosts/geisha b/retiolum/hosts/geisha new file mode 100644 index 00000000..6a3a2788 --- /dev/null +++ b/retiolum/hosts/geisha @@ -0,0 +1,11 @@ +Subnet = 10.243.175.29 +Subnet = 42:b6aa:9052:fffc:807b:4829:8756:860c + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEA0kVV9ezFx/kZ6GvSALhXODkWlwHSjdA5hBJ90bdNcILeltVa3FIv +K2E+L6EG/jsETWKutxOk08+B/Z3p1SONgEksTNBdXx/Crww5PZGN/ocVSKZj61/N +lCej/Jcu88a4/R7JHIiSMdmqRCGHnwnxRA0iDQZIunriUH83NqMBQk6Drkphr/9a +5U8PhlqC5oSzZrg0uReRuBK86KmU03vp9/DndaLn18G835dtWRBQ2aEfIrrlaTPJ +ZKN/0xYZJU3v8YJYPi+UeRSymecSNgFQg36v95r3s4j3trk+yXVzVwT347AZRm4a +d/AHdk0+blXyUr5CFBsjA71cJfzqIIJJrwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From 680b55ab5c2601ead3adfa8050f121e8fa2d7d2c Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 28 Jan 2013 23:11:00 +0100 Subject: moved to new ircchannel --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 65611b1c..f8407c98 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -28,7 +28,7 @@ RMASK=${RMASK:-255.255.0.0} URL=${URL:-http://euer.krebsco.de/retiolum/hosts.tar.gz} SURL=${SURL:-http://euer.krebsco.de/retiolum/supernodes.tar.gz} -IRCCHANNEL=${IRCCHANNEL:-"#krebsco"} +IRCCHANNEL=${IRCCHANNEL:-"#krebs"} IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} -- cgit v1.2.3 From 41a72197fa4e84668bd8e93cf23923581f9f8d91 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 29 Jan 2013 16:14:30 +0000 Subject: fix chown incompatibility --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index f8407c98..4cfa9699 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -296,7 +296,7 @@ fi #fix permissions chmod +x tinc-up -chown -R root:root . +chown -R 0:0 . #generate keys with tinc if type tincctl >/dev/null; then -- cgit v1.2.3 From d221dc6c4a959edbbab7dde34020d9ce46897b8e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 29 Jan 2013 16:18:04 +0000 Subject: refactor type in new_install --- retiolum/scripts/tinc_setup/new_install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4cfa9699..12c0588b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -12,9 +12,10 @@ SUBNET4=${SUBNET4:-10.243} SUBNET6=${SUBNET6:-42} TEMPDIR=${TEMPDIR:-auto} TINCDIR=${TINCDIR:-auto} +exists() { type "$1" >/dev/null 2>/dev/null; } -if type hostname >/dev/null ;then SYSHOSTN=${HOSTNAME:-$(hostname)} -elif type uci >/dev/null ;then SYSHOSTN=$(uci get system.@system[0].hostname) +if exists hostname ;then SYSHOSTN=${HOSTNAME:-$(hostname)} +elif exists uci ;then SYSHOSTN=$(uci get system.@system[0].hostname) elif [ -e /etc/hostname ] ;then SYSHOSTN=$(cat /etc/hostname) else SYSHOSTN="unknown" fi @@ -106,7 +107,7 @@ find_os() { if grep -qe 'Linux' /etc/*release 2>/dev/null || grep -qe 'Linux' /etc/issue 2>/dev/null; then OS=1 - elif type getprop >/dev/null; then + elif exists getprop ; then OS=2 elif test -e /etc/openwrt_release; then OS=3 @@ -135,13 +136,13 @@ if [ $OS -eq 0 ]; then fi #check if everything is installed -if ! type awk >/dev/null; then +if ! exists awk ; then echo "Please install awk" exit 1 fi -if ! type curl >/dev/null; then - if ! type wget >/dev/null; then +if ! exists curl ; then + if ! exists wget ; then echo "Please install curl or wget" exit 1 else @@ -299,7 +300,7 @@ chmod +x tinc-up chown -R 0:0 . #generate keys with tinc -if type tincctl >/dev/null; then +if exists tincctl ; then yes | tincctl -n $NETNAME generate-keys cat rsa_key.pub >> hosts/$HOSTN else -- cgit v1.2.3 From 0124dceeea93bf9cb8e4b7c23c9a0cef15ee7089 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 17:46:36 +0100 Subject: OS-strings instead of numbers --- retiolum/scripts/tinc_setup/new_install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 12c0588b..e2049a4b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -106,14 +106,14 @@ get_hostname() find_os() { if grep -qe 'Linux' /etc/*release 2>/dev/null || grep -qe 'Linux' /etc/issue 2>/dev/null; then - OS=1 + OS='linux' elif exists getprop ; then - OS=2 + OS='android' elif test -e /etc/openwrt_release; then - OS=3 + OS='openwrt' else echo "Cannot determine your operating system, falling back to Linux" - OS=1 + OS='linux' fi } @@ -158,7 +158,7 @@ if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then fi #check if everything is installed -if [ $OS -eq 2 ]; then +if [ $OS = 'android' ]; then if ! test -e /data/data/org.poirsouille.tinc_gui/files/tincd; then echo "Please install tinc-gui" exit 1 @@ -234,7 +234,7 @@ get_hostname $HOSTN mkdir -p $TINCDIR/$NETNAME cd $TINCDIR/$NETNAME -if [ $OS -eq 3 ]; then +if [ $OS = 'openwrt' ]; then mkdir hosts $LOADER $SURL | tar xz -C hosts/ else @@ -307,7 +307,7 @@ else yes | $TINCBIN -n $NETNAME -K fi -if [ $OS -eq 2 ]; then +if [ $OS = 'android' ]; then mkdir /etc/tinc cd / mv $TINCDIR/$NETNAME /etc/tinc/ -- cgit v1.2.3 From 702b0bd06cf86a296243470e0a4ca9fe20c01407 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 17:55:01 +0100 Subject: osx proto added --- retiolum/scripts/tinc_setup/new_install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e2049a4b..a52d1edc 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -111,6 +111,8 @@ find_os() OS='android' elif test -e /etc/openwrt_release; then OS='openwrt' + elif uname -s | grep -qi 'darwin'; then + OS='osx' else echo "Cannot determine your operating system, falling back to Linux" OS='linux' @@ -170,8 +172,11 @@ if [ $OS = 'android' ]; then mount -o remount,rw /system DEV="/dev/tun" fi +#elif [ $OS = 'osx' ]; then +# echo 'this is not implemented' +# exit 1 else - if ! type tincd >/dev/null; then + if ! exists tincd >/dev/null; then echo "Please install tinc" exit 1 else -- cgit v1.2.3 From 58c8c76afbf980c22715272b6de1ae9287bddbe3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 18:05:20 +0100 Subject: more osx support --- retiolum/scripts/tinc_setup/new_install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index a52d1edc..1ff42e54 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -166,24 +166,31 @@ if [ $OS = 'android' ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd + DEV="/dev/tun" if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi mount -o remount,rw / mount -o remount,rw /system - DEV="/dev/tun" fi -#elif [ $OS = 'osx' ]; then -# echo 'this is not implemented' -# exit 1 +elif [ $OS = 'osx' ]; then + if ! exists tincd >/dev/null; then + echo "Please install tinc" + exit 1 + else + TINCBIN=tincd + DEV="/dev/net/tun" + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi + fi else if ! exists tincd >/dev/null; then echo "Please install tinc" exit 1 else TINCBIN=tincd + DEV="/dev/net/tun" if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi - DEV="/dev/net/tun" fi fi @@ -268,7 +275,7 @@ EOF host2subnet $MASK4 #check if ip is installed -if type ip >/dev/null; then +if exists ip >/dev/null; then echo 'dirname="`dirname "$0"`"' > tinc-up echo '' >> tinc-up echo 'conf=$dirname/tinc.conf' >> tinc-up -- cgit v1.2.3 From 60c0873b5e07c11a78f8e7ed3a3462026d47c987 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 29 Jan 2013 17:50:49 +0000 Subject: add hosts/rage see services://rage:22 for more info --- retiolum/hosts/rage | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 retiolum/hosts/rage (limited to 'retiolum') diff --git a/retiolum/hosts/rage b/retiolum/hosts/rage new file mode 100644 index 00000000..dd9a70e2 --- /dev/null +++ b/retiolum/hosts/rage @@ -0,0 +1,11 @@ +Subnet = 10.243.211.81 +Subnet = 42:73d5:8402:f8f1:0250:0bc3:e2ec:850d + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEA6dOSRjCwkdx/nOSQwiiCw889YBSlf0ZAymBSaWJ+XdLnktqqZIvQ ++1RMdfpTTsIaHoLDwvBI6gW9dhV5MEeP3AlWfKPZAMCWg8l3PkTERZILWGSLiizs +zCyJgLpsb2MP7rT3RlLlHyTNdx9QXxDX2K1Y/fJsjXuTTgwg3JPlPM2huGTZtWgM +GDFsRpfe37hIuIheYBgnP99OvEgx3rLyCDvd16kIMd2Pjx4SouVQqaBmvEmg+UEH +zD79GaO7c2xkqq6JggJw1q/xZnH+5CF8280kh/niXVqy8R/hP75FU1rvjHnMJvfo +nyPGC8ir2m6iy4CR07YBIYo1PRTXGDC1vwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3