From: Silvio Rhatto Date: Fri, 12 May 2017 17:29:36 +0000 (-0300) Subject: Fix dest SSH key file names at kvmx_up X-Git-Tag: 0.1.0~432 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=833f61610af0afed244dea654a103987ff381122;p=kvmx.git Fix dest SSH key file names at kvmx_up --- diff --git a/kvmx b/kvmx index 4eba46d..2a11eaf 100755 --- a/kvmx +++ b/kvmx @@ -265,7 +265,7 @@ function kvmx_up { if [ ! -z "$basebox" ]; then if [ -e "$GLOBAL_USER_CONFIG_FOLDER/$basebox" ]; then baseimage="`kvmx list_image $basebox`" - basekey="$(ls `dirname $baseimage`/ssh/*.key)" + basekey="$(ls `dirname $baseimage`/ssh/$basebox.key)" if [ ! -e "$baseimage" ]; then echo "$BASENAME: could not find basebox $baseimage. Please create it first." @@ -280,7 +280,8 @@ function kvmx_up { fi if [ -e "$basekey" ]; then - imagekey="`dirname $image`/ssh/`basename $image .img`.key" + vmname="$(basename `dirname $image`)" + imagekey="`dirname $image`/ssh/$vmname.key" mkdir -p "`dirname $image`/ssh" cp $basekey $imagekey