git://git.onelab.eu
/
vsys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a9f5c6
)
Get EGRE key from egre-keys.txt file
author
Andy Bavier
<acb@cs.princeton.edu>
Thu, 25 Sep 2008 16:18:56 +0000
(16:18 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Thu, 25 Sep 2008 16:18:56 +0000
(16:18 +0000)
factory/setup-link
patch
|
blob
|
history
diff --git
a/factory/setup-link
b/factory/setup-link
index
e5cbd2f
..
78bc750
100755
(executable)
--- a/
factory/setup-link
+++ b/
factory/setup-link
@@
-6,7
+6,16
@@
SLICE=$1
SLICEID=`id -u $SLICE`
read INDEX
read REMOTE
-read KEY
+
+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
LINK=${KEY}if${INDEX}