diff options
author | makefu <github@syntax-fehler.de> | 2014-01-14 00:52:14 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-01-14 00:52:14 +0100 |
commit | e97a9f9244a13cd583344a1960799474da4c1321 (patch) | |
tree | 6190fa01622ca5ceea9cf49c5df858f3245221f6 /retiolum/scripts | |
parent | 38ad7a96c55c15486ec87b51b91315021943f8c8 (diff) | |
parent | bc4c246294458ef8275188cbbb6697a695e3f351 (diff) |
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'retiolum/scripts')
-rwxr-xr-x | retiolum/scripts/tinc_setup/new_install.sh | 6 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/tinc-up | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 50fbc3b5..b48649ec 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -209,9 +209,7 @@ EOF echo '' >> tinc-up echo 'conf=$dirname/tinc.conf' >> tinc-up echo '' >> tinc-up - echo 'name=$(sed -n "s|^ *Name *= *\([^ ]*\) *$|\\1|p" $conf)' >> tinc-up - echo '' >> tinc-up - echo 'host=$dirname/hosts/$name' >> tinc-up + echo 'host=$dirname/hosts/$NAME' >> tinc-up echo '' >> tinc-up echo 'ip link set $INTERFACE up' >> tinc-up echo '' >> tinc-up @@ -222,7 +220,7 @@ EOF echo "ip -4 route add 172.22.0.0/15 dev \$INTERFACE" >> tinc-up echo '' >> tinc-up echo "addr6=\$(sed -n \"s|^ *Subnet *= *\\($SUBNET6[:][^ ]*\\) *\$|\\\\1|p\" \$host)" >> tinc-up - echo 'ip -6 addr add $addr6 dev $INTERFACE' >> tinc-up + echo 'ip -6 addr add $addr6 dev $INTERFACE || exit 0' >> tinc-up echo "ip -6 route add $SUBNET6::/$MASK6 dev \$INTERFACE" >> tinc-up else echo 'dirname="`dirname "$0"`"' > tinc-up diff --git a/retiolum/scripts/tinc_setup/tinc-up b/retiolum/scripts/tinc_setup/tinc-up index 043e1e46..acb81b5d 100755 --- a/retiolum/scripts/tinc_setup/tinc-up +++ b/retiolum/scripts/tinc_setup/tinc-up @@ -4,9 +4,7 @@ dirname="`dirname "$0"`" conf=$dirname/tinc.conf -name=`sed -n 's|^ *Name *= *\([^ ]*\) *$|\1|p' $conf` - -host=$dirname/hosts/$name +host=$dirname/hosts/$NAME ip link set $INTERFACE up @@ -16,5 +14,5 @@ ip -4 route add 10.243.0.0/16 dev $INTERFACE ip -4 route add 172.22.0.0/15 dev $INTERFACE addr6=`sed -n 's|^ *Subnet *= *\(42[:][^ ]*\) *$|\1|p' $host` -ip -6 addr add $addr6 dev $INTERFACE +ip -6 addr add $addr6 dev $INTERFACE || exit 0 ip -6 route add 42::/16 dev $INTERFACE |