summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/scripts
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-27 15:36:20 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-27 15:44:43 +0200
commit402a70a9c1df350cf6911ec5b1372d7c1efdc6b4 (patch)
treedc4a28484e973190839c5ad58a9b5bbda4059c92 /modules/retiolum/scripts
parent58695662f2d4bebe53b2b3dd9974bac44b4b9ead (diff)
parent77355d28e804ace544f78674866f894bf96a7f89 (diff)
fixed penisland
Diffstat (limited to 'modules/retiolum/scripts')
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/install.sh6
-rw-r--r--modules/retiolum/scripts/tinc_setup/write_channel.py9
2 files changed, 9 insertions, 6 deletions
diff --git a/modules/retiolum/scripts/tinc_setup/install.sh b/modules/retiolum/scripts/tinc_setup/install.sh
index b7679041..8834aafc 100755
--- a/modules/retiolum/scripts/tinc_setup/install.sh
+++ b/modules/retiolum/scripts/tinc_setup/install.sh
@@ -2,13 +2,11 @@
# USE WITH GREAT CAUTION
make -C ../../ update
-
set -e
-
CURR=`pwd`
MYBIN=../../bin
-netname=penisland
+netname=retiolum
# create configuration directory for $netname
mkdir -p /etc/tinc/$netname/hosts
cd /etc/tinc/$netname
@@ -50,7 +48,7 @@ else
fi
-myipv6=${myipv6:-`sed -rn 's|^Subnet *= *(42:[0-9A-Fa-f:]*/128)|\1|p' /etc/tinc/$netname/hosts/$myname`}
+myipv6=${myipv6-`sed -rn 's|^Subnet *= *(42:[0-9A-Fa-f:]*/128)|\1|p' /etc/tinc/$netname/hosts/$myname`}
cat>tinc-up<<EOF
#! /bin/sh
diff --git a/modules/retiolum/scripts/tinc_setup/write_channel.py b/modules/retiolum/scripts/tinc_setup/write_channel.py
index 71866a8d..a11d4605 100644
--- a/modules/retiolum/scripts/tinc_setup/write_channel.py
+++ b/modules/retiolum/scripts/tinc_setup/write_channel.py
@@ -1,11 +1,16 @@
#!/usr/bin/python
import random, sys, time, socket
+try:
+ myname=sys.argv[1]
+except:
+ print "you are made of stupid"
+ exit (23)
CHANNEL = '#tincspasm'
HOST='irc.freenode.net'
-FILE="/etc/tinc/retiolum/hosts/$myname"
+FILE="/etc/tinc/retiolum/hosts/"+myname
PORT=6667
-NICK= "${myname}_"+str(random.randint(23,666))
+NICK= myname+"_"+str(random.randint(23,666))
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect((HOST,PORT))