summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/scripts/includes/set_runvirt_variables.inc
blob: 5215eb2dca6cd4bcde3942b102985dfd3ef3c1a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
######################################################
# Include: Declaration of run-virt default variables #
######################################################

VMCHOOSER_DIR="/opt/openslx/vmchooser"
VMCHOOSER_CONF_DIR="$VMCHOOSER_DIR/config"
LOGFILE="/var/log/openslx/run-virt.${USER}.$$.log"
USER="$(whoami)"
TMPDIR="/tmp/virt/${USER}/$$"

readonly VMCHOOSER_DIR VMCHOOSER_CONF_DIR LOGFILE TMPDIR USER

# include general configuration from vmchooser
[ -f "$VMCHOOSER_CONF_DIR/vmchooser.conf" ] && . "$VMCHOOSER_CONF_DIR/vmchooser.conf"
# load general virtualization information
[ -f "$VMCHOOSER_CONF_DIR/virtualization.conf" ] && . "$VMCHOOSER_CONF_DIR/virtualization.conf"
# Load general openslx config
[ -f "/opt/openslx/config" ] && . "/opt/openslx/config"
# Create temp dir
mkdir -p "$TMPDIR" # TODO error out if failed