diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-05-12 14:17:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-05-12 14:17:35 -0300 |
commit | fdb4857ccb53574c8f3a4489efdbc96560e4522b (patch) | |
tree | 35c96278c625a9bcfe76f786c24145add253e1de | |
parent | abebbffa068018e9c849a26bab1eb309aaf07d23 (diff) | |
download | kvmx-fdb4857ccb53574c8f3a4489efdbc96560e4522b.tar.gz kvmx-fdb4857ccb53574c8f3a4489efdbc96560e4522b.tar.bz2 |
Fix SSH key file name 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="`dirname $baseimage`/ssh/`basename $baseimage .img`.key" + basekey="$(ls `dirname $baseimage`/ssh/*.key)" if [ ! -e "$baseimage" ]; then echo "$BASENAME: could not find basebox $baseimage. Please create it first." @@ -279,9 +279,10 @@ function kvmx_up { cp $baseimage $image fi + echo $basekey if [ -e "$basekey" ]; then imagekey="`dirname $image`/ssh/`basename $image .img`.key" - mkdir "`dirname $image`/ssh" + mkdir -p "`dirname $image`/ssh" cp $basekey $imagekey cp $basekey.pub $imagekey.pub |