diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-05-12 14:29:36 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-05-12 14:29:36 -0300 |
commit | 833f61610af0afed244dea654a103987ff381122 (patch) | |
tree | 91249afdb21f94c66209329ca5047045371a6b8e | |
parent | 740421ffbbbc425c1b6362c26e80a63dc412bd34 (diff) | |
download | kvmx-833f61610af0afed244dea654a103987ff381122.tar.gz kvmx-833f61610af0afed244dea654a103987ff381122.tar.bz2 |
Fix dest SSH key file names at kvmx_up
-rwxr-xr-x | kvmx | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |