aboutsummaryrefslogtreecommitdiff
path: root/kvmx
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-04-20 10:59:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-04-20 10:59:14 -0300
commit3aa08bd1f537faa8b3ebf013d1be0318d2ec498c (patch)
tree6982968a0b0b7d08063a62fb8a653f2c2ea95f1e /kvmx
parent8d87ca5155aa95bf3b3ab94e419cc46ab862becd (diff)
downloadkvmx-3aa08bd1f537faa8b3ebf013d1be0318d2ec498c.tar.gz
kvmx-3aa08bd1f537faa8b3ebf013d1be0318d2ec498c.tar.bz2
Copy kvmxfile if needed at kvmx_clone
Diffstat (limited to 'kvmx')
-rwxr-xr-xkvmx5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index 6af78f9..e98921d 100755
--- 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 )