From a7c3985212df3b1c3599fe50d0542883d69ae1c6 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 10 Nov 2011 01:39:57 +0100 Subject: //retiolum tinc-up: first set up interface, then configure --- retiolum/scripts/tinc_setup/tinc-up | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/tinc-up b/retiolum/scripts/tinc_setup/tinc-up index 1a04706a..225f63a7 100755 --- a/retiolum/scripts/tinc_setup/tinc-up +++ b/retiolum/scripts/tinc_setup/tinc-up @@ -8,6 +8,8 @@ name=`sed -n 's|^ *Name *= *\([^ ]*\) *$|\1|p' $conf` host=$dirname/hosts/$name +ip link set $INTERFACE up + addr4=`sed -n 's|^ *Subnet *= *\(42[.][^ ]*\) *$|\1|p' $host` ip -4 addr add $addr4 dev $INTERFACE ip -4 route add 42.0.0.0/8 dev $INTERFACE @@ -15,5 +17,3 @@ ip -4 route add 42.0.0.0/8 dev $INTERFACE addr6=`sed -n 's|^ *Subnet *= *\(42[:][^ ]*\) *$|\1|p' $host` ip -6 addr add $addr6 dev $INTERFACE ip -6 route add 42::/16 dev $INTERFACE - -ip link set $INTERFACE up -- cgit v1.2.3