Skip to content

Commit

Permalink
added stub for generating tunnel password file upon cluster registration
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 15, 2009
1 parent 3058ba2 commit de5fc75
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/euca_conf.in
Expand Up @@ -685,8 +685,18 @@ if [ -n "$NEWCLUS" ]; then
exit 1
fi

# create tunnel password
TUNPASS=`md5sum $EUCALYPTUS/var/lib/eucalyptus/keys/cloud-pk.pem | awk '{print $1}'`
if [ ${TUNPASS} != "" ]; then
echo ${TUNPASS} > ${EUCALYPTUS}/var/lib/eucalyptus/keys/vtunpass
chmod 0600 ${EUCALYPTUS}/var/lib/eucalyptus/keys/vtunpass
chown ${EUCA_USER} ${EUCALYPTUS}/var/lib/eucalyptus/keys/vtunpass
else
echo "ERROR: Unable to create tunnel password, tunneling will not function"
fi

# sync the keys
if [ $NEWCLUS} = "127.0.0.1" -o ${NEWCLUS} = localhost -o ${NEWCLUS} = "`hostname -s`" -o ${NEWCLUS} = "`hostname -f`" ]; then
if [ ${NEWCLUS} = "127.0.0.1" -o ${NEWCLUS} = localhost -o ${NEWCLUS} = "`hostname -s`" -o ${NEWCLUS} = "`hostname -f`" ]; then
# machine is localhost, not need for remote syncing
if [ -d "$EUCALYPTUS/var/lib/eucalyptus/keys/" ]; then
KEYDIR="$EUCALYPTUS/var/lib/eucalyptus/keys/"
Expand Down

0 comments on commit de5fc75

Please sign in to comment.