]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Copy kvmxfile if needed at kvmx_clone
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Apr 2018 13:59:14 +0000 (10:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Apr 2018 13:59:14 +0000 (10:59 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 6af78f919d0366842d6a490f5e6a00b7aeaf4366..e98921dc1c06f8f8d4112d2ed69c68d6c0003d4e 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1055,6 +1055,11 @@ function kvmx_clone {
   # Remove old state folder
   rm -rf $FOLDER/state/*
 
+  # Copy kvmxfile if not present on $FOLDER
+  if [ ! -e "$FOLDER/kvmxfile" ]; then
+    cat $GLOBAL_USER_CONFIG_FOLDER/$VM > $FOLDER/kvmxfile
+  fi
+
   # Create config entry
   ( cd $GLOBAL_USER_CONFIG_FOLDER && ln -s $FOLDER/kvmxfile $DEST )