]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Keep spicec the default client when spice_client is not defined
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 23 Jun 2018 12:59:28 +0000 (09:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 23 Jun 2018 12:59:28 +0000 (09:59 -0300)
kvmx

diff --git a/kvmx b/kvmx
index c6c9137d3bc5c4c60de6235038392512b804b3d1..b3454ce338a8b3a2e8859a3c5b4761fc4a8a3952 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -254,14 +254,14 @@ function kvmx_spice {
     spicy -h localhost -p $PORT &
   elif [ "$spice_client" == "virt-viewer" ] && which virt-viewer &> /dev/null; then
     remote-viewer spice://localhost:$PORT &
-  elif [ "$spice_client" == "spicec" ]; then
+  elif [ ! -z "$spice_client" ] && [ "$spice_client" != "spicec" ]; then
+    echo "$BASENAME: spice_client $spice_client not currently supported"
+    exit 1
+  else
     if which spicec &> /dev/null; then
       # https://lists.freedesktop.org/archives/spice-devel/2013-September/014643.html
       SPICE_NOGRAB=1 spicec --host localhost --port $PORT &> $SPICELOG &
     fi
-  else
-    echo "$BASENAME: spice_client $spice_client not currently supported"
-    exit 1
   fi
 
   SPICEPID="$!"