diff options
author | Simon Rettberg | 2016-10-19 15:07:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-10-19 15:07:25 +0200 |
commit | 7c70ebde186c9589bd6e56f04d9f9bab682a3c14 (patch) | |
tree | a50105db62d13275dfacb774a15c51cdea76bcfc /remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt | |
parent | [vmware/run-virt] Try to rename includes to what they actually do (diff) | |
download | tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.tar.gz tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.tar.xz tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.zip |
[run-virt] More cleanup; kill legacy support, rename and move includes, kill dead code
Diffstat (limited to 'remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt')
l---------[-rwxr-xr-x] | remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt | 116 |
1 files changed, 1 insertions, 115 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt index ea3cfe8e..447f98bc 100755..120000 --- a/remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt @@ -1,115 +1 @@ -#!/bin/bash -# Full bash required -# ----------------------------------------------------------------------------- -# Copyright (c) 2007..2010 - RZ Uni FR -# Copyright (c) 2007..2013 - OpenSLX GmbH -# -# This program 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 suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# run-virt.sh -# - This is the generic wrapper for the several virtualization solutions. -# The idea is to setup a set of variables used by at least two different -# tools and then include the specific plugin which configures the speci- -# fied virtualization tool. -################################################################################ - -RUNVIRTINCLUDEDIR=/opt/openslx/scripts/includes -xmlfile="$1" - -# Functions needed by vmchooser-run_virt (writelog(), cleanexit(), rv_clean_string()) -source ${RUNVIRTINCLUDEDIR}/vmchooser_runvirt_functions.inc && trap 'trap "" SIGINT SIGTERM; cleanexit' SIGINT SIGTERM -# Define default dirs / get configs -source ${RUNVIRTINCLUDEDIR}/set_runvirt_variables.inc -# Function to detect whether we can use the new way (vmx via http) or the old way (legacy): -source ${RUNVIRTINCLUDEDIR}/detect_legacy.inc # This yields LEGACY, IMGUUID, IMGVMX -# For scanning for certain usb classes -source "${RUNVIRTINCLUDEDIR}/usb_detector.inc" - -if [ "$LEGACY" ]; then - # check for important files used (filecheck()) - vestigial? - source ${RUNVIRTINCLUDEDIR}/check_runvirt_needed_files.inc - # Get XML file and dir, legacy (old way) - source ${RUNVIRTINCLUDEDIR}/get_xml_file_dir_legacy.inc # xmlfile=$1 - # xml file sanity checks, legacy - source ${RUNVIRTINCLUDEDIR}/check_runvirt_xml_sanity_legacy.inc - # print console logo - source ${RUNVIRTINCLUDEDIR}/print_runvirt_console_logo.inc - # Read needed variables from XML file - source ${RUNVIRTINCLUDEDIR}/get_xml_file_variables_legacy.inc - # Declaration of hardware relatedt variables - source ${RUNVIRTINCLUDEDIR}/set_runvirt_hardware_variables_legacy.inc - # Sound setup the rest of the environment and run the configured vm - source ${RUNVIRTINCLUDEDIR}/setup_sound.inc - # Start printer daemon - source ${RUNVIRTINCLUDEDIR}/setup_printer_lpd.inc - # Setup virtual floppy b: for windows guests with config.xml, openslx.exe etc. - source ${RUNVIRTINCLUDEDIR}/setup_virtual_floppy.inc - # Try to use dnbd3 to access the image, nfs/cifs fallback - source ${RUNVIRTINCLUDEDIR}/setup_image_access.inc - # Get all virtual machine specific stuff from the respective include file - source ${RUNVIRTINCLUDEDIR}/setup_vm_hypervisor.inc - # start a windowmanager for easier handling - source ${RUNVIRTINCLUDEDIR}/start_windowmanager.inc - # Check if tcpsvd is running. Do not check immediately after spawning, - # as this could result in success even if it's not really working. - source ${RUNVIRTINCLUDEDIR}/check_lpd.inc -else - # check for important files used (filecheck()) - vestigial? - # This include does not currently work. TODO. - # source ${RUNVIRTINCLUDEDIR}/check_runvirt_needed_files.inc && filecheck - - # Firewall - source "${RUNVIRTINCLUDEDIR}/setup_firewall.inc" || writelog "Could not source setup_firewall" - setup_firewall || writelog "Could not run setup_firewall" - - # Read needed variables from XML file - source ${RUNVIRTINCLUDEDIR}/get_xml_file_variables.inc - - # Sound setup the rest of the environment and run the configured vm - source ${RUNVIRTINCLUDEDIR}/setup_sound.inc - - # Declaration of hardware relatedt variables - source ${RUNVIRTINCLUDEDIR}/set_runvirt_hardware_variables.inc - - # Start printer daemon - source ${RUNVIRTINCLUDEDIR}/setup_printer_lpd.inc - - # Setup virtual floppy b: for windows guests with config.xml, openslx.exe etc. - source ${RUNVIRTINCLUDEDIR}/setup_virtual_floppy.inc - - # Get all virtual machine specific stuff from the respective include file - source ${RUNVIRTINCLUDEDIR}/setup_image_access.inc - - # start a windowmanager for easier handling - source ${RUNVIRTINCLUDEDIR}/setup_vm_hypervisor.inc - - # Try to use dnbd3 to access the image, nfs/cifs fallback - source ${RUNVIRTINCLUDEDIR}/start_windowmanager.inc - - # Check if tcpsvd is running. Do not check immediately after spawning, - # as this could result in success even if it's not really working. - source ${RUNVIRTINCLUDEDIR}/check_lpd.inc - -fi - -# This will start the VM -writelog "VM command: eval ${VIRTCMD} ${VIRTCMDOPTS}" - -# Transported from vmware-runvirt include -sync - -eval ${VIRTCMD} ${VIRTCMDOPTS} -writelog "Bye." - -# Postrun for commands after virtualization finishes -if [ -n "${POSTRUN}" ]; then - eval ${POSTRUN} >/dev/null 2>&1 -fi - -cleanexit 0 +/opt/openslx/vmchooser/vmchooser-run_virt
\ No newline at end of file |