summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrebs <krebs@UTART>2011-05-04 10:04:19 -1100
committerkrebs <krebs@UTART>2011-05-04 10:04:19 -1100
commitaf22e7b35167e3800f0bbaa15db13f26ebb100d1 (patch)
tree1a7b2e15f2fb428484f226ad389015c46b299fe5
parentfd2669ea1af199784b975980b03be2a596bfe29f (diff)
parent9b1e94e651bfcde956a527dbd95467f7e08613db (diff)
Merge branch 'retiolum'
-rw-r--r--modules/retiolum/README13
-rwxr-xr-xmodules/retiolum/build_arch.sh14
-rwxr-xr-xmodules/retiolum/build_debian.sh16
-rwxr-xr-xmodules/retiolum/build_ec2.sh16
-rw-r--r--modules/retiolum/build_no.de.sh1
-rw-r--r--modules/retiolum/hosts/Lassulus9
-rw-r--r--modules/retiolum/hosts/alphalabs9
-rw-r--r--modules/retiolum/hosts/also9
-rw-r--r--modules/retiolum/hosts/foobaz8
-rw-r--r--modules/retiolum/hosts/kaah11
-rw-r--r--modules/retiolum/hosts/krebs10
-rw-r--r--modules/retiolum/hosts/miefda9019
-rw-r--r--modules/retiolum/hosts/miefdahome9
-rw-r--r--modules/retiolum/hosts/miefdat10
-rw-r--r--modules/retiolum/hosts/no_omo9
-rw-r--r--modules/retiolum/hosts/pa_sharepoint7
-rw-r--r--modules/retiolum/hosts/pfleidi9
-rw-r--r--modules/retiolum/hosts/pornocauster9
-rw-r--r--modules/retiolum/hosts/supernode10
-rw-r--r--modules/retiolum/hosts/tart6
-rwxr-xr-xmodules/retiolum/install.sh68
21 files changed, 262 insertions, 0 deletions
diff --git a/modules/retiolum/README b/modules/retiolum/README
new file mode 100644
index 00000000..e6ae9454
--- /dev/null
+++ b/modules/retiolum/README
@@ -0,0 +1,13 @@
+This directory contains the build and install scripts for shack-retiolum
+
+1. build_arch
+ arch linux build script
+2. build_debian
+ debian build script
+3. build_ec2
+ Amazon ec2 base instance build script
+4. install.sh
+ configures the tinc daemon
+ $1 is the nickname
+ $2 is the ip-address
+hosts.tar contains the currently available hosts
diff --git a/modules/retiolum/build_arch.sh b/modules/retiolum/build_arch.sh
new file mode 100755
index 00000000..5ef5d765
--- /dev/null
+++ b/modules/retiolum/build_arch.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+sudo pacman -S openssl gcc lzo
+curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
+cd tinc-1.0.13
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+make
+sudo make install
+cd ..
+
+echo "overwriting python to python2"
+sed 's/\/usr\/bin\/python/\/usr\/bin\/python2/g' install.sh >install2.sh
+mv install2.sh install.sh
+
diff --git a/modules/retiolum/build_debian.sh b/modules/retiolum/build_debian.sh
new file mode 100755
index 00000000..ecec41a3
--- /dev/null
+++ b/modules/retiolum/build_debian.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -x
+MYIP=10.0.7.7.55
+
+aptitude install tinc git
+
+
+git clone https://github.com/makefu/shack-retiolum.git
+
+cd shack-retiolum
+
+./install.sh `hostname` $MYIP
+
+# for autostart
+echo "retiolum" >> /etc/tinc/nets.boot
+echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc
diff --git a/modules/retiolum/build_ec2.sh b/modules/retiolum/build_ec2.sh
new file mode 100755
index 00000000..79f2af28
--- /dev/null
+++ b/modules/retiolum/build_ec2.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+sudo yum install -y gcc openssl-devel
+mkdir build
+cd build
+curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar xz
+cd lzo-2.04
+./configure --prefix=/usr
+make
+sudo make install
+cd ..
+curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
+cd tinc-1.0.13
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+make
+sudo make install
diff --git a/modules/retiolum/build_no.de.sh b/modules/retiolum/build_no.de.sh
new file mode 100644
index 00000000..2976d3a2
--- /dev/null
+++ b/modules/retiolum/build_no.de.sh
@@ -0,0 +1 @@
+pkgin in lzo gcc-tools gcc-compiler gcc34
diff --git a/modules/retiolum/hosts/Lassulus b/modules/retiolum/hosts/Lassulus
new file mode 100644
index 00000000..61c2d62b
--- /dev/null
+++ b/modules/retiolum/hosts/Lassulus
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.11
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAsj1PCibKOfF68gmFQ+wwyfhUWpqKqpznrJX1dZ+daae7l7nBHvsE
+H0QwkiMmk3aZy1beq3quM6gX13aT+/wMfWnLyuvT11T5C9JEf/IS91STpM2BRN+R
++P/DhbuDcW4UsdEe6uwQDGEJbXRN5ZA7GI0bmcYcwHJ9SQmW5v7P9Z3oZ+09hMD+
+1cZ3HkPN7weSdMLMPpUpmzCsI92cXGW0xRC4iBEt1ZeBwjkLCRsBFBGcUMuKWwVa
+9sovca0q3DUar+kikEKVrVy26rZUlGuBLobMetDGioSawWkRSxVlfZvTHjAK5JzU
+O6y6hj0yQ1sp6W2JjU8ntDHf63aM71dB9QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/alphalabs b/modules/retiolum/hosts/alphalabs
new file mode 100644
index 00000000..6aea1dec
--- /dev/null
+++ b/modules/retiolum/hosts/alphalabs
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.10
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAvUAbMmmOFn+4kOvJAvmi0R/XCQa1YBlkjUvC6Pmt0Q8gV1DodXjB
+DgwP8yhLcxaVy2Hk82aJvNTUrfMeB2sdt1RJHQiEPQkHthdp8Spm0Px4uTiMjmFB
+ev91xi00eCCGIKsXdh/qso1K7EDHt9MEVHOvSlkawWzoyJ6AaHStW1ElwDdGjZpl
+0YWrhx4Gk5X7pCp3LKkQJFfGtqoqGOVg2JjqK3qMsAdRo6QvYDqjFzARed/D0k55
+kcKXjBJAVxoU/CqGfS/Lr0fL8tdYgXaAXvPO9dbr1t0KyOUY2KRNBePeSvRp/etb
+H0LBPsO9F7PQiPI3DBoWCYgsuj/hBXapvwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/also b/modules/retiolum/hosts/also
new file mode 100644
index 00000000..9f9dcd73
--- /dev/null
+++ b/modules/retiolum/hosts/also
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.23
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAsnF1eyd/R4qXMGo8UEZ98hnJK+6ZEKUubgdzEwAuSxK40B6nX8Ry
+Euy3v3s0ps/GMdE52gUbFB+bhM99hHiKW+7zcxnoMJ69a9yK6VG0Im+7ib0WTliZ
+llgUfRETQd/2KaIfJWH/nVsBuK0hp1LscroWcoO08BCw6v94q3He8502Bk/ZYZQF
+wD7Y6LldipWKo/K9YtIU3zD3taj2NGnetOc0BRRncSgGiicXJKhtfcs+Ti2Y/ITz
+bFkHnFgB0KnhjwJBumxdmgjHWknlwVkROvmzIgyoXxqEw31bF+g/XzA7RTMXsiFM
+w0SZ15k4HG5L1PWpUyY2Th5yIjMW+sSrhQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/foobaz b/modules/retiolum/hosts/foobaz
new file mode 100644
index 00000000..47ac4d6e
--- /dev/null
+++ b/modules/retiolum/hosts/foobaz
@@ -0,0 +1,8 @@
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA4wJHcyS3PI2rugPbhQy5qLKQwtaOIsLV367b9Pq6VLKEly2dWAZx
+xvFmdKRbm/n/HaRzX+vyDuhWOxkzrF0NLNrrU58Rw5suHfNU2ryuO1QB2sIGMj1R
+QXwB+W6MNM5OamBkLLo740aPvVjfud9tc3yrUg6mTCJP1tbRLgHyDy6DT3s5WGvO
+R6bfYRjdzVLjwqqn5P/ED51gBgDmJEhoWzQ4IzBSO+mxRrkvwfPQNiTSrrQBAiU7
+r5lstDzEY8qDdwY6t1w91hxm34LLJ/gQr9uvXGF/GThm4J8Ndlj4tOl8UmFbo3Nz
+6Zm0b2JZ4dWbA/NXp7Sf9qKC5duQkAPb1QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/kaah b/modules/retiolum/hosts/kaah
new file mode 100644
index 00000000..d56014fa
--- /dev/null
+++ b/modules/retiolum/hosts/kaah
@@ -0,0 +1,11 @@
+Address = kaah.ath.cx
+Subnet = 10.7.7.21
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAtd9+R7NYs/5LmXoFakuoFzdO/8hy4MMeGjdDqbubKyJmIO/nvQWS
+TQns55znLgPIapUtCijxphoQrcTB5LijVXFj/2uipqiOJHVmhA80NiQgYhrFG++x
+9AQie2c04xqq+6Bptjs8vnQS6odLsBAiY1OJDpaEPZqzrpSMnYzEwPWqOAzzbVRd
+SFDokIhm62xmDK0+M4H8l3zmMnInnxdHd0fMhBJr5lXXqdzXJ3zluU6fZyHysF4c
+OnvFrGNrc3MPpgmzULVUUVg+Z4NeQYa5LuhXA9xia0R5d8ALCi34L4tAvCfSi1Lu
+RSUiJHeWDvNzwIy9+hxofqqcJqA05kyGLQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/krebs b/modules/retiolum/hosts/krebs
new file mode 100644
index 00000000..4aba5105
--- /dev/null
+++ b/modules/retiolum/hosts/krebs
@@ -0,0 +1,10 @@
+Subnet = 10.7.7.156
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAl6vUmUL8w8r2gUTpUF8QWx0U3nzDPao2I7l0WU1NnGcR8DVug7YN
+595guvDkRGcM4eYGizgVYVvDCmjTQRXRn57ucVud2bGE1NGtdomVs6wggpgzLiaf
+m9BJwsigoCyMv+8ewGfc+D10TupulcIiZSp/RAewYlX0rhmgdsEGnCt+TWvXRsIa
+kY1pvt4YeKjs2ctib3OmaPuNokK4ophxSpdZ5arjHCaiVMj2O6pPAQbU7WFY63Fw
+UP64cAmtqBM+uMteT7bdG1jT3KZS6W7Dy8rIBd+pp+vB656A5PhrDcGEUMFSXqPD
+BwIxhV7OAejSn4XjrZyd5eNtMOQKopIMQwIDAQAB
+-----END RSA PUBLIC KEY-----
+
diff --git a/modules/retiolum/hosts/miefda901 b/modules/retiolum/hosts/miefda901
new file mode 100644
index 00000000..a1b59a29
--- /dev/null
+++ b/modules/retiolum/hosts/miefda901
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.22
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEApbEYmHf0vEDYa/2aVvWVxEGgC+JJlXcArdxkQooSIpnZfSAfsH0S
+MFz8v7UkM7EJSwDsFWf+gxyoAORdFpdQm+XQoDqWVZ1e0isYtNluP2C/51s3lu2F
+kVLZ+86el7zd4unHG+6CHmyaBcO5yV6VU8WFeuinB2+ojnujOWlHgOipMOrxsab8
+vwcH/0k/iR9BjH9xzo+kwhzqG0plLkQnvsvVyDN/gQj0Euz6YHfgo5c2gxQKKH7h
+Bv6prIxCbpY7WMMtg0z+OlyGkQefVRl18kZwoNtOFlh5NBe7imYcH+wyhhQ9rqnN
+VoHpJw4lNOuWfy3Af28kYDQ7KnPGYFq4nwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/miefdahome b/modules/retiolum/hosts/miefdahome
new file mode 100644
index 00000000..9a9f4310
--- /dev/null
+++ b/modules/retiolum/hosts/miefdahome
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.30
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAopwKn000XAcoI61OqQ7cjgrPHm/jHmuB1LHeCUggWMOD78WDFNzq
+8/l9ASlU9kbSZFhoMuBR5BPWgciYWsC1EqY1nRAc/Si1rUHnJw+Xcyl0MNsZ7Cef
+WaFRvC1VNC3qlQp5/e+fi46oOp4i+BqlFSxe7Jrr0EVyBVTOw8rMGToqDsOih6M9
+SFvmVMOnqh7n8LEOUtAL4nID59k7CTXzoNhXc0cEJoBkC2YCexonb4ru/J8F2BRG
+Y3yzHYVskBrrPie1JNhfUHGCABIbtODTiHQYH8NFTYzdBnVV88IWqiTBbmKcRf+j
+zEyGyXu/3YLFfjmsi7ysT+BWLIPvkyr7/wIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/miefdat b/modules/retiolum/hosts/miefdat
new file mode 100644
index 00000000..43e2a6e6
--- /dev/null
+++ b/modules/retiolum/hosts/miefdat
@@ -0,0 +1,10 @@
+Subnet = 10.7.7.20
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAvCestFRcrr10nzSzc1l4Flkv6ZG5ijGneZBeDaP+bB3GhFx0BYzP
+CQjcCFTcExVVAorknjX1/rjT60+dSBuJoH/pEeloPowtwm6YVgfhcQD/5qRHmAPF
+Ss1pdiTVtyi0BmcqDGoOTcR/tR4v2LBEDnxK89wWIFWbeDeR6UyjD2psbFBal8Zd
+TmkuBTg1OGPVhB+BmuKSqPBt6AtLV+0fKHdrTOVNwF2W/8lCVTd3uCVtnUEeTLrW
+KA8h9C0K2gAxxhJTF3pJtR/YQPpgwXRg3CfzMKsvHNOsqfMnnk/WFM0vrSJSi2El
+xCD5Pm/BPZyA8B4vhz8im4hWofOP2/JiNwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/no_omo b/modules/retiolum/hosts/no_omo
new file mode 100644
index 00000000..f2398f18
--- /dev/null
+++ b/modules/retiolum/hosts/no_omo
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.111
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAuHQEeowvxRkoHJUw6cUp431pnoIy4MVv7kTLgWEK46nzgZtld9LM
+ZdNMJB9CuOVVMHEaiY6Q5YchUmapGxwEObc0y+8zQxTPw3I4q0GkSJqKLPrsTpkn
+sgEkHPfs2GVdtIBXDn9I8i5JsY2+U8QF8fbIQSOO08/Vpa3nknDAMege9yEa3NFm
+s/+x+2pS+xV6uzf/H21XNv0oufInXwZH1NCNXAy5I2V6pz7BmAHilVOGCT7g2zn6
+GasmofiYEnro4V5s8gDlQkb7bCZEIA9EgX/HP6fZJQezSUHcDCQFI0vg26xywbr6
+5+9tTn8fN2mWS5+Pdmx3haX1qFcBP5HglwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/pa_sharepoint b/modules/retiolum/hosts/pa_sharepoint
new file mode 100644
index 00000000..384a7c22
--- /dev/null
+++ b/modules/retiolum/hosts/pa_sharepoint
@@ -0,0 +1,7 @@
+Address = pa-sharepoint.informatik.ba-stuttgart.de
+Subnet = 10.7.7.5
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBAKSle+5vi8j+auGIC41PwFRPdzuyhP/paAEht+9mWpTYYC1meyPDwQR8
+EPNLwj1ccjsAvhubfaDmI3B13cBQx5q1BbTCK81Y5RS1tj384kvAabJAtKsz3aIg
+1hWXjiDJUGNpQhKsD7IIg4lkkDcgOBAbdtXlynCQXdQL+YjLTavBAgMBAAE=
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/pfleidi b/modules/retiolum/hosts/pfleidi
new file mode 100644
index 00000000..416658cf
--- /dev/null
+++ b/modules/retiolum/hosts/pfleidi
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.177
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAwdoS19bbKmVncJcf+uT5nNpyuR8SL9ekd+XMoKBpoqDf0r7ap3F2
+HLNI82NSbSAA4zdASrfrDl75sJ05VIIsueNAwMkFc72YNA9CPBFGcvCNVi0d4XcC
+t6voNrgCVaxT77MVBAnohT7+HfYmkTTSrLaDKusRx7ybz6ZaRO9i2peC2VWKVIjP
+m3QlvPeTpIJg/nGEBNO3rotBPxpMEB+fJnWxfBHRlt9klK3VhLaXCLUt5KcJ2SA4
+q3BFQbptUfI+d6OSA9btJerdtZ3PVBqlIJ45b3RDUWMborVg6jQ7S4WBzARe1eKs
+SHHk0aR5LoiSGiNVGTDlxLVe1UT1dF8voQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/pornocauster b/modules/retiolum/hosts/pornocauster
new file mode 100644
index 00000000..eee28777
--- /dev/null
+++ b/modules/retiolum/hosts/pornocauster
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.42
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAnztrijsfao+fmNtwAjqwIDKsRaMP3ECsq2T2zqKvxwCyXk69G9bG
+RFhWjgaawS9ZhnHSlgWK/vtoR0O9NxpzdU/mvdQijbVGxM02DegjO9qDSIe8EGmA
+kscW4nDqYtw4rtjOVPfnNiWXbcWD8eiYR0kcSWmSvfOpVvdhTETqduTx5HRHyEFD
+JRQYR/tJSvVWXmM670PENAPNJFJ4VSJR60s5A+bFT7J/uw7HzJXX28LygJz73Dj2
+2a4ev0WcZQngLq072h/91R/TOpg+ogUDVhXkQtKyFj7im0287JTL4bXGofZBhzaf
++h9dFGs1QLoNyhG/cgt9fog7boSXTelAiQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/supernode b/modules/retiolum/hosts/supernode
new file mode 100644
index 00000000..5cee4e32
--- /dev/null
+++ b/modules/retiolum/hosts/supernode
@@ -0,0 +1,10 @@
+Address = 46.252.21.5
+Subnet = 10.7.7.1
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAr3DlBmQxP9UTBCkohK8FCYSk2td4Ov5lQYvC3Adx04lEWHfp+0nP
+sShYqqN9Aj3iCqj/DHx5jGuSqjyTmmFWIOMM9IwKMo2Oiz/PcBM56N6gzIHuR5wj
++0bV0NRhePD2Tqo3zsEly9Hxw7xmz8azm5l4GcyOtgdRV7R1T3j/jB/9Kv2sj2Y7
+1zhSedCxjt/+NosiZZGE2JhLjzMgsCZSroAIKCZ3X/DP81mTTRxibjol82/Qn61I
+b7GbuuB7SwjtZ+9xjsExN1JX5+AFuw9a3AkYuKWLpP50YY16/OTPq7flmB/EtK+Z
+rrESIYKtX7pJbLc8Ywi0hBL5oPm07q+0BQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/hosts/tart b/modules/retiolum/hosts/tart
new file mode 100644
index 00000000..986140ee
--- /dev/null
+++ b/modules/retiolum/hosts/tart
@@ -0,0 +1,6 @@
+Subnet = 10.7.7.123
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBALvZ4rLz0soCzkyOraC1aKtJzfVqYd2je6rkuaV12CLybCUc6YXaW/HP
+rzJyDGmdh355kU4FNNyjnWP/U/juhMaeYFyTUWCRVXdqvDdeiEe/EJ0g+fFGKvPY
+DEFo3VMCEkrXKuwDBQP02b4xmAWWnVBityGv5tgDFjl9uXh/SzL1AgMBAAE=
+-----END RSA PUBLIC KEY-----
diff --git a/modules/retiolum/install.sh b/modules/retiolum/install.sh
new file mode 100755
index 00000000..5fa1d4a5
--- /dev/null
+++ b/modules/retiolum/install.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# USE WITH GREAT CAUTION
+
+set -e
+myname="${1:-dummy}"
+rel_hostsfile=`dirname $0`/hosts
+hostsfile=`readlink -f $rel_hostsfile`
+netname=retiolum
+myipv4="${2:-10.7.7.56}"
+mynet4=10.7.7.0
+CURR=`pwd`
+# create configuration directory for $netname
+mkdir -p /etc/tinc/$netname
+cd /etc/tinc/$netname
+
+# get currently known hosts
+cp -r $hostsfile .
+echo "added known hosts:"
+ls -1 | LC_ALL=C sort
+echo "delete the nodes you do not trust!"
+
+
+cat>tinc-up<<EOF
+#! /bin/sh
+ifconfig \$INTERFACE up $myipv4/24
+route add -net $mynet4/24 dev \$INTERFACE
+EOF
+
+chmod +x tinc-up
+
+cat>tinc.conf<<EOF
+Name = $myname
+ConnectTo = supernode
+ConnectTo = kaah
+ConnectTo = pa_sharepoint
+Device = /dev/net/tun
+EOF
+echo "Subnet = $myipv4" > hosts/$myname
+tincd -n $netname -K
+
+echo Writing Public Key to irc channel
+cat>write_channel.py<<EOF
+#!/usr/bin/python
+import random, sys, time, socket
+
+CHANNEL = '#tincspasm'
+HOST='irc.freenode.net'
+FILE="/etc/tinc/retiolum/hosts/$myname"
+PORT=6667
+NICK= "$myname"+str(random.randint(23,666))
+
+sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+sock.connect((HOST,PORT))
+print NICK
+sock.send("NICK %s\r\n" % NICK)
+sock.send("USER %s %s bla : %s\r\n" %(NICK,HOST,NICK))
+sock.send("JOIN %s\r\n" % CHANNEL)
+time.sleep(23)
+with open(FILE,'r') as f:
+ a = [ sock.send("PRIVMSG %s : %s" % ( CHANNEL,line)) for line in f]
+ time.sleep(5) #because irc is so lazy
+print "closing socket"
+sock.close()
+EOF
+python write_channel.py
+# add user tincd
+useradd tincd
+tincd --user=tincd --chroot -n $netname