diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-14 21:04:14 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-14 21:04:14 -0300 |
commit | 688ab1325cbd58edf0d89f845b9d356e0536bd24 (patch) | |
tree | 60510f489d78e429fc78bde07fb6b6bc038beed6 | |
parent | b11270a9e24cbae5d96847850b6aef9ce1e61451 (diff) | |
download | kvmx-688ab1325cbd58edf0d89f845b9d356e0536bd24.tar.gz kvmx-688ab1325cbd58edf0d89f845b9d356e0536bd24.tar.bz2 |
Test first for ssh_support at kvmx_ssh
-rwxr-xr-x | kvmx | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -630,6 +630,11 @@ function kvmx_usage { # Log into the guest using SSH function kvmx_ssh { + if [ "$ssh_support" != "y" ]; then + echo "$BASENAME: SSH support for $VM is disabled" + exit 1 + fi + if ! kvmx_running || kvmx_suspended; then echo "$BASENAME: $VM not running, trying to start it..." kvmx up $VM || exit 1 @@ -638,11 +643,6 @@ function kvmx_ssh { #exit 1 fi - if [ "$ssh_support" != "y" ]; then - echo "$BASENAME: SSH support for $VM is disabled" - exit 1 - fi - # Shift params according to how the program was called: # either "kvmx ssh" or "kvmx ssh guest". #if [ "$ACTION" == "ssh" ]; then |