diff options
author | makefu <github@syntax-fehler.de> | 2014-02-26 17:04:54 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-02-26 17:04:54 +0100 |
commit | be4d573b21895449e57a8263a5a9ca292500a74b (patch) | |
tree | cf80c8d13988bac1c12f7dd91e7b489924c22c2f | |
parent | 823bb86ca91da435ce631e9c17ffdcf9f803e6ae (diff) |
sort //ship/lib/retiolum
-rw-r--r-- | ship/lib/retiolum | 56 | ||||
-rw-r--r-- | sites/tahoe.retiolum/README.md | 13 |
2 files changed, 41 insertions, 28 deletions
diff --git a/ship/lib/retiolum b/ship/lib/retiolum index 2a5c7338..3956a200 100644 --- a/ship/lib/retiolum +++ b/ship/lib/retiolum @@ -5,34 +5,9 @@ tinc_path=${tinc_path:-/etc/tinc} netname=${netname:-retiolum} hosts_dir=${hosts_dir:-$tinc_path/$netname/hosts} -check_free_v4(){ - myipv4=${1-10.243.0.-1} - v4num=${myipv4##*.} - printf "Retard check: " - if [ "$v4num" -gt 0 -a "$v4num" -lt "256" ]; - then - info "No retard detected\n" - cd $hosts_dir - info "Check if ip is still free: " - for i in `ls -1`; do - if grep -q -e $myipv4\$ $i ;then - warn "Host IP already taken by $i! " - return 1 - fi - done - info "Passed\n" - return 0 - else - error "you are made of stupid. bailing out\n" - return 1 - fi - cd - >/dev/null -} -find_active_nodes(){ - # TODO this function currently only supports a single address for a host +find_supernodes(){ cd $hosts_dir - # posix grep does not support [[:space:]] set +f for name in ` grep '^[ ]*Address[ ]*=' * | @@ -54,8 +29,11 @@ find_active_nodes(){ wait cd - >/dev/null } -find_supernodes(){ + +find_active_nodes(){ + # TODO this function currently only supports a single address for a host cd $hosts_dir + # posix grep does not support [[:space:]] set +f for name in ` grep '^[ ]*Address[ ]*=' * | @@ -77,3 +55,27 @@ find_supernodes(){ wait cd - >/dev/null } + +check_free_v4(){ + myipv4=${1-10.243.0.-1} + v4num=${myipv4##*.} + printf "Retard check: " + if [ "$v4num" -gt 0 -a "$v4num" -lt "256" ]; + then + info "No retard detected\n" + cd $hosts_dir + info "Check if ip is still free: " + for i in `ls -1`; do + if grep -q -e $myipv4\$ $i ;then + warn "Host IP already taken by $i! " + return 1 + fi + done + info "Passed\n" + return 0 + else + error "you are made of stupid. bailing out\n" + return 1 + fi + cd - >/dev/null +} diff --git a/sites/tahoe.retiolum/README.md b/sites/tahoe.retiolum/README.md index 01e8ed03..2d3b3e12 100644 --- a/sites/tahoe.retiolum/README.md +++ b/sites/tahoe.retiolum/README.md @@ -5,6 +5,17 @@ introducer and a number of tahoe bricks. # Adding new bricks & clients see //cholerab/tahoe/{brick,client}\_installation + +# Migration of the Introducer +At some point it is necessary to migrate the tahoe introducer. +To keep everything running just take the tahoe introducer configuration from +the old host or from krebs:tahoe/introducer AND the original tinc configuration +of the tahoe host. +After that, set the tahoe.krebsco.de ip in the krebs zone. + + +If you need to re + # Replacing the introducer if the introducer may die off, all crypto material is saved in krebs:tahoe/introducer. There will be a backup somewhere, but bootstrapping @@ -13,4 +24,4 @@ always sucks. Follow the generic brick installation, use the configuration file at conf/tahoe.cfg and copy the crypto material in the private folder of the installation. -autostart that shit +autostart that shit. |