summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-09 17:11:35 +0200
committerSimon Rettberg2019-07-09 17:11:35 +0200
commit08349fb2fd1a79861996df893cb07b152dded777 (patch)
treea1a26b8df8f42a9e1cb1273060bf3eb93a486456 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes
parent[xorg] Remove unneeded package (diff)
downloadmltk-08349fb2fd1a79861996df893cb07b152dded777.tar.gz
mltk-08349fb2fd1a79861996df893cb07b152dded777.tar.xz
mltk-08349fb2fd1a79861996df893cb07b152dded777.zip
[run-virt] Get rid of wrapper and handle directly in run-virt
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes')
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc18
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc5
2 files changed, 3 insertions, 20 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
index cc204d53..79b2ddd1 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
@@ -3,24 +3,6 @@
# Include: Sets core variables and directories #
################################################
-# Check if the path to the logfile was given externally (by the wrapper)
-unset WRAPPED
-if notempty LOGFILE; then
- if [ ! -w "${LOGFILE}" ]; then
- # given logfile is not writeable or non-existant
- # so handle it ourself (so do not set WRAPPED)
- rm -f "${LOGFILE}"
- unset LOGFILE
- else
- # given logfile was ok, mark that we are wrapped
- # (for cleanexit to not slxlog the log since
- # the wrapper is handling that for us)
- declare -rg WRAPPED=aye
- fi
-fi
-isset LOGFILE || declare -rg LOGFILE="/var/log/openslx/run-virt.${USER}.$$.log"
-ln -sf "$LOGFILE" "/var/log/openslx/run-virt.latest.log"
-
# Create temporary directory for current invocation
if check_dep mkdir && ! mkdir -p "$TMPDIR" "$CONFDIR"; then
writelog "Could not create temporary directories for session"
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
index 7b4554ea..aaace562 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
@@ -176,8 +176,9 @@ cleanexit() {
# first send the logfile (in case the user does not close the error before using magic keys e.g.)
# for any other error types besides 'user'. Do no slxlog if we run wrapped (from /opt/openslx/scripts/vmchooser-run_virt)
- [ "x${EXIT_TYPE}" != "xuser" ] && ! isset WRAPPED && \
- slxlog "runvirt-exit-${EXIT_TYPE}" "Critical error happened in '${BASH_SOURCE[1]}:${FUNCNAME[1]}', see logs." "${LOGFILE}"
+ if [ "x${EXIT_TYPE}" != "xuser" ]; then
+ writelog "Critical error happened in '${BASH_SOURCE[1]}:${FUNCNAME[1]}'"
+ fi
# finally display the error
error_user "${ERR_TITLE}" "