summaryrefslogtreecommitdiffstats
path: root/core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc')
-rw-r--r--core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc b/core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc
new file mode 100644
index 00000000..52a341ba
--- /dev/null
+++ b/core/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/write_config_files_legacy.inc
@@ -0,0 +1,29 @@
+###############################
+# Include: Write config files #
+###############################
+
+write_config_files_legacy() {
+ # create vmware directories
+ mkdir -p "$redodir" >/dev/null 2>&1
+ mkdir -p "$confdir" >/dev/null 2>&1
+ mkdir -p "$vmhome/dndlogs" >/dev/null 2>&1
+ touch "$vmhome/dndlogs/dndlog.conf" >/dev/null 2>&1
+
+ # create preferences file ${vmhome}/preferences
+ source "${VMWAREINCLUDEDIR}/create_vmhome_preferences_file.inc" && create_vmhome_preferences_file
+
+ # create VMware config file (conffile)
+ source "${VMWAREINCLUDEDIR}/create_vmware_config_file_legacy.inc" && create_vmware_config_file_legacy
+
+ # link to conffile if confdir != redodir
+ [ "$confdir" != "$redodir" ] && ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1
+
+ # sync is needed to ensure that data is really written to virtual disk
+ # TODO: Move to general run-virt, right before exec of vm
+ sync
+
+ # own nvram. We need it for floppy drive b, default nvram has just drive a
+ if ! cp "/opt/openslx/vmchooser/vmware/nvram" "$confdir/nvram"; then
+ slxlog "virt-vmware-nvram" "Could not copy nvram from '/opt/openslx/vmchooser/vmware/nvram' '$confdir/nvram'"
+ fi
+}