summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/emufe/files/run-virt.include
diff options
context:
space:
mode:
Diffstat (limited to 'src/os-plugins/plugins/emufe/files/run-virt.include')
-rw-r--r--src/os-plugins/plugins/emufe/files/run-virt.include85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/os-plugins/plugins/emufe/files/run-virt.include b/src/os-plugins/plugins/emufe/files/run-virt.include
new file mode 100644
index 00000000..913b0380
--- /dev/null
+++ b/src/os-plugins/plugins/emufe/files/run-virt.include
@@ -0,0 +1,85 @@
+# run-virt.include
+# -----------------------------------------------------------------------------
+# Copyright (c) 2011 - RZ Uni Freiburg
+# Copyright (c) 2011 - OpenSLX GmbH
+#
+# This program/file is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org
+# -----------------------------------------------------------------------------
+# run-virt.include
+# - Include script for running the various emulators via a common frontend
+# script via the common run-virt.sh of the vmchooser
+################################################################################
+
+################################################################################
+### Include general configuration
+################################################################################
+if [ -f ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf ]; then
+ . ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf
+else
+ writelog "Problems reading config file of ${self} plugin"
+ # TODO: exit wenn conf wichtig
+ #exit 1
+fi
+
+################################################################################
+### Declaration of default variables
+################################################################################
+
+PLUGINCONFQK="${PLUGINCONFROOT}/${self}"
+PLUGINDIRQK=${OPENSLX_DEFAULT_DIR}/plugin-repo/${self}
+# create TMPDIR for all users
+mkdir -m 1777 /tmp/${self} 2>/dev/null
+# TMPDIR
+QKTMPDIR="/tmp/${self}/${USER}/${VM_ID}"
+# define dirs and files which can be removed after exit, be carefull!
+RMDIRS="${QKTMPDIR}"
+rm -rf ${RMDIRS} 2>/dev/null
+mkdir -m 1777 -p ${QKTMPDIR} 2>/dev/null
+# vmpath is the path to the emulator/original system image
+diskfile=${vmpath}
+
+
+# display name, remove blanks because of cmdline problems
+displayname=$(echo ${displayname} | sed -e "s, ,-,g")
+VIRTCMDOPTS="${VIRTCMDOPTS} -name ${displayname}"
+
+writelog "Directories:"
+writelog "\tTMPDIR:\t\t\t$QKTMPDIR"
+writelog "Diskimage:"
+writelog "\tDisk type:\t\t$imgtype"
+writelog "\tDisk file:\t\t$diskfile"
+
+################################################################################
+### Emulator definitions
+################################################################################
+
+
+writelog "Virtual Hardware:"
+writelog "\tGuest RAM:\t\t${mem} MB"
+# echo nur wenn memhost gesetzt
+[ -n "${memhost}" ] && writelog "\tHost RAM:\t\t${memhost} MB"
+writelog "\tMAC address:\t\t$macaddr"
+writelog "\tNetwork card:\t\t${network_card}"
+writelog "\tNetwork kind:\t\t${network_kind}"
+#writelog "\tCD-ROM1:\t${cdrom0}"
+#writelog "\tCD-ROM2:\t${cdrom1}"
+#writelog "\tFloppy_A:\t${floppy0}"
+#writelog "\tFloppy_B:\t${floppy1}"
+#writelog "\tShared Folders 'home':\t/home/${USER}"
+
+################################################################################
+### finally set env for run-virt.sh
+################################################################################
+
+
+# define first, you do not want VIRTCMDOPTS from graphical start
+VIRTCMDHL=${VIRTCMD}
+VIRTCMDOPTSHL="${VIRTCMDOPTS} -nographic ${diskfile}"
+
+