diff options
author | Simon Rettberg | 2017-06-23 16:08:11 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-06-23 16:08:11 +0200 |
commit | ef2e688c7e864bbc48d4f2bec59aa4e7d3487ce2 (patch) | |
tree | e59278a8e9fdaf558d1167391f6829da6d0ba268 /core/modules/vmware | |
parent | [printergui] fix typo (diff) | |
download | mltk-ef2e688c7e864bbc48d4f2bec59aa4e7d3487ce2.tar.gz mltk-ef2e688c7e864bbc48d4f2bec59aa4e7d3487ce2.tar.xz mltk-ef2e688c7e864bbc48d4f2bec59aa4e7d3487ce2.zip |
[vmware] Support RW mode
Diffstat (limited to 'core/modules/vmware')
-rw-r--r-- | core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc b/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc index 94996ff1..84ddee1d 100644 --- a/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc +++ b/core/modules/vmware/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc @@ -7,8 +7,13 @@ # check for vmdk file marker %VM_DISK_PATH% and put vmdk path in it's place: also VM_DISK_MODE # and VM_DISK_REDOLOGDIR. replace_placeholders() { - sed -i 's#%VM_DISK_PATH%#'"$VM_DISKFILE_RO"'#g' "${TMPCONFIG}" - sed -i 's#%VM_DISK_MODE%#'"independent-nonpersistent"'#g' "${TMPCONFIG}" + if [ -n "$VM_DISKFILE_RW" ]; then + sed -i 's#%VM_DISK_PATH%#'"$VM_DISKFILE_RW"'#g' "${TMPCONFIG}" + sed -i 's#%VM_DISK_MODE%#'"independent-persistent"'#g' "${TMPCONFIG}" + else + sed -i 's#%VM_DISK_PATH%#'"$VM_DISKFILE_RO"'#g' "${TMPCONFIG}" + sed -i 's#%VM_DISK_MODE%#'"independent-nonpersistent"'#g' "${TMPCONFIG}" + fi sed -i 's#%VM_DISK_REDOLOGDIR%#'"$VM_REDO_DIR"'#g' "${TMPCONFIG}" } |