summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt
diff options
context:
space:
mode:
authorJonathan Bauer2017-02-14 17:58:28 +0100
committerJonathan Bauer2017-02-14 17:58:28 +0100
commitb21ee6b876c851010bfe24c944c6a5034a6c0ba6 (patch)
treec83d41a7fd8b2cd0f25417ca4b6309e4fbc63ef1 /core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt
parent[rootfs-stage31] Don't open debug shell if we're booting with splash screen (diff)
downloadmltk-b21ee6b876c851010bfe24c944c6a5034a6c0ba6.tar.gz
mltk-b21ee6b876c851010bfe24c944c6a5034a6c0ba6.tar.xz
mltk-b21ee6b876c851010bfe24c944c6a5034a6c0ba6.zip
[runvirt] introduced wrapper script to start ...
... runvirt with to hopefully always have either a user notification or a log entry on the satellites if anything goes wrong. Also fixed the MAC address generation: the prefix is now fully defined in the systemd-run_virt_env script and correctly written in the vmware's dhcp configuration file (so that VMs the default local IP by default)
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt')
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt b/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt
index 1bf9de3e..c4c053af 100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt
@@ -18,18 +18,16 @@
# tools and then include the specific plugin which configures the speci-
# fied virtualization tool.
################################################################################
-
-# HACK: workaround if $0 is a symlink, exec its symlink target instead
SELF=$(readlink -f "$0")
-if [ -n "$SELF" ] && [ "$0" != "$SELF" ]; then
- exec "$SELF" "$@"
-fi
-declare -rg RUN_VIRT_INCLUDE_DIR="$(dirname $SELF)/run-virt-includes"
# This script expects the path to the xml file describing the VM to be started
declare -rg XML_FILE="$1"
+# A path to the logfile can be given as second argument
+declare -rg LOGFILE="$2"
+
# Functions needed by vmchooser-run_virt (writelog(), cleanexit(), safesource())
+declare -rg RUN_VIRT_INCLUDE_DIR="$(dirname $SELF)/run-virt-includes"
if ! source "${RUN_VIRT_INCLUDE_DIR}/vmchooser_runvirt_functions.inc"; then
slxlog "run-virt" "Could not source ${RUN_VIRT_INCLUDE_DIR}/vmchooser_runvirt_functions.inc"
exit 1