summaryrefslogtreecommitdiffstats
path: root/remote/modules/vbox/data
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-07 16:19:27 +0100
committerSimon Rettberg2016-01-07 16:19:27 +0100
commit3467aef515acaac01760c3e92cc3db09dc474d96 (patch)
tree7085c113d6c35079d804728e0399f83846275d97 /remote/modules/vbox/data
parent[beamergui,udhcpc] Don't create pointless files in /tmp (diff)
downloadtm-scripts-3467aef515acaac01760c3e92cc3db09dc474d96.tar.gz
tm-scripts-3467aef515acaac01760c3e92cc3db09dc474d96.tar.xz
tm-scripts-3467aef515acaac01760c3e92cc3db09dc474d96.zip
[run-virt,vmware,vbox] Unify directory layout in /tmp, better cleanup
Diffstat (limited to 'remote/modules/vbox/data')
-rwxr-xr-xremote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include12
1 files changed, 6 insertions, 6 deletions
diff --git a/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include b/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include
index f35bc9d8..1b116f32 100755
--- a/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include
+++ b/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include
@@ -19,12 +19,13 @@
################################################################################
VMCHOOSERVBOX="/opt/openslx/vmchooser/${self}"
-TMPDIR=/tmp/virt/${self} # create TMPDIR for all users
-mkdir -m 1777 ${TMPDIR} 2>/dev/null
-confdir="/tmp/virt/${self}/${USER}/${VM_ID}" # dir for configs
+confdir="${TMPDIR}/vbox" # dir for configs
export VBOX_USER_HOME=${confdir} # instead of $HOME/.VirtualBox
# define dirs and files which can be removed after exit, be carefull!
-RMDIRS="${snapshotdir} ${confdir} /tmp/virt/.vbox-${USER}-ipc"
+# TODO: Machanism not in use anymore. A better approach would be anyways to
+# Define a fixed directory which can be deleted recursively on exit. $TMPDIR
+# would be a start.
+#RMDIRS="${snapshotdir} ${confdir} /tmp/virt/.vbox-${USER}-ipc"
# rm -rf ${RMDIRS} 2>/dev/null
machfolder="${confdir}/Machines"
# use vm_shortname for dir and config names since vm_name can be very long
@@ -205,7 +206,7 @@ if echo "${imgmode}" | grep -q rw; then
cleanexit 1
fi
touch "${vmpath}.lock" # add lock
- RMDIRS="${RMDIRS} ${vmpath}.lock" # remove lock after VM stopped
+ #RMDIRS="${RMDIRS} ${vmpath}.lock" # remove lock after VM stopped TODO See note at the top
imgtype="Normal"
imageuuid=${diskuuid} # replace image uuid in machine config
elif [ ${diskless} -eq 0 ]; then
@@ -432,5 +433,4 @@ VIRTCMDOPTS="--startvm ${machineuuid} --start-running --fullscreen"
# set headless mode (-v off to disable vrdp)
VIRTCMDHL=$(which VBoxHeadless 2>/dev/null)
VIRTCMDOPTSHL="-s ${machineuuid}"
-RMDIRS="${TMPDIR}"