]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Check if VM is running at kvmx_install
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 23:20:16 +0000 (20:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 23:20:16 +0000 (20:20 -0300)
README.md
kvmx

index 0ae49a4632a2621e203532dc7d20c91151c86d2e..358f5e6bf4267bac680ce5e69dd4af2bbfea7001 100644 (file)
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ You can test your new system with
 
 Then, if everything is fine, stop the guest and turn it on again, this time with
 
-    kvmx up <guest>
+    kvmx up <project-name>
 
 ## Further development
 
diff --git a/kvmx b/kvmx
index 0b8dc145db6ecd9cb56bbcc1d1c52d8b1da50777..64746a32e81d50ed2bf09f931db6fb9c7b9d277f 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1298,6 +1298,11 @@ function kvmx_mv {
 
 # Install system
 function kvmx_install {
+  if kvmx_running; then
+    echo "$BASENAME: guest $VM is running"
+    exit 1
+  fi
+
   local media="$3"
 
   if [ -z "$media" ]; then