summaryrefslogblamecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_vm_hypervisor.inc
blob: 80b7dbb98b7c9afa0eff9fcb78629e11e34388ba (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                                                          









                                                                                                                               


          

                                     
##########################################################################
# Include: Setup virtual machine hypervisor via vm-specific include file #
##########################################################################
## Functions ##
setup_vm_commandline() {
	# Sanity checks
	if ! isset PLUGIN_ID; then
		writelog "Sanity check failed: PLUGIN_ID is not set."
		EXIT_TYPE="internal" EXIT_REASON="Konnte kein Virtualisierer für das gewählte Image ermitteln!" cleanexit 1
	fi
	if ! $(safesource "$VMCHOOSER_DIR/plugins/$PLUGIN_ID/run-virt.include"); then
		# safesource logs errors on its own
		EXIT_TYPE="internal" EXIT_REASON="Konnte Virtualisierungsplugin '$PLUGIN_ID' nicht initialisieren!" cleanexit 1
	fi
}

## Main ##
call_post_source setup_vm_commandline