X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=factory%2Fsetup-link;h=e5cbd2f1f6270da78cdf2ce96a2f96c437327b50;hb=21f1fe1dd8b0c1073b16cbbde5af3beb55e61fd2;hp=58a431f3940e0b90def0048f65870b1c2572d51d;hpb=2ff1d83ce67954109341d8878d9228657da77516;p=vsys.git diff --git a/factory/setup-link b/factory/setup-link index 58a431f..e5cbd2f 100755 --- a/factory/setup-link +++ b/factory/setup-link @@ -6,16 +6,7 @@ SLICE=$1 SLICEID=`id -u $SLICE` read INDEX read REMOTE - -KEYFILE="/etc/vini/egre-keys.txt" -if [ -e "$KEYFILE" ]; then - KEY=$( awk -v slice=$SLICE '$1 == slice {print $2}' $KEYFILE ) -fi -if [ -z "$KEY" ]; then - echo "No EGRE key found for slice $SLICE!" - echo "Please send mail to vini-users@lists.planet-lab.org." - exit 1 -fi +read KEY LINK=${KEY}if${INDEX} @@ -24,7 +15,7 @@ modprobe etun ### Setup EGRE tunnel EGRE=d$LINK -$IP tunnel add $EGRE mode gre/eth remote $REMOTE key $KEY ttl 64 +$IP tunnel add $EGRE mode gre/eth remote $REMOTE key $KEY $IP link set $EGRE up ### Setup etun