summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt8
1 files changed, 6 insertions, 2 deletions
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index d2b046ec..2c48218c 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -62,10 +62,12 @@ cleanexit () {
# Kill LPD
kill "$PID_LPD"
- exit "$1"
- exit 1 # No exit code was given :/
+ [ $# -gt 0 ] && exit "$1"
+ exit 129 # No exit code was given :/
}
+trap cleanexit SIGINT SIGTERM
+
# check for important files used
filecheck ()
{
@@ -520,7 +522,9 @@ done
if [[ "$DO_PROFILE" -ge "1" ]]; then
wget "http://132.230.8.113/profile/do.php?action=start"
fi
+# This will start the VM
eval ${VIRTCMD} ${VIRTCMDOPTS}
+#
writelog "Bye."
# Postrun for commands after virtualization finishes