]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fix SSH keypair file names on kvmx-create
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 31 Mar 2017 18:02:54 +0000 (15:02 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 31 Mar 2017 18:02:54 +0000 (15:02 -0300)
kvmx-create

index 5fb2ca454047d0635d1f8e9616f98a5ef6d0964d..2e73f94ff2cedb18aee902f805dd749d617d4fa8 100755 (executable)
@@ -262,10 +262,10 @@ function kvmx_create_custom {
 
   if [ "$ssh_support" == "y" ]; then
     if [ "$ssh_custom" == "y" ]; then
-      privkey="`dirname $image`/ssh/`basename $image .img`.key"
+      privkey="`dirname $image`/ssh/$hostname.key"
       pubkey="${privkey}.pub"
       mkdir -p "`dirname $privkey`"
-      __kvmx_ssh_keygen $privkey "$user@`basename $image .img`"
+      __kvmx_ssh_keygen $privkey "$user@$hostname"
     else
       pubkey="$DIRNAME/share/ssh/insecure_private_key.pub"
     fi