summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d
diff options
context:
space:
mode:
authorSimon Rettberg2018-12-07 17:20:29 +0100
committerSimon Rettberg2018-12-07 17:20:29 +0100
commit9c56eb8b8c34106fb23826b17a6e82368dc91109 (patch)
treee15e9b7eb9664c45d3933a38b309184c2719da71 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d
parent[inc/setup_target] Unfuck module cleaning (diff)
downloadmltk-9c56eb8b8c34106fb23826b17a6e82368dc91109.tar.gz
mltk-9c56eb8b8c34106fb23826b17a6e82368dc91109.tar.xz
mltk-9c56eb8b8c34106fb23826b17a6e82368dc91109.zip
[run-virt] Download VM data as combined .tgz
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d')
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc
index e2854f77..5729373a 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc
@@ -81,11 +81,14 @@ setup_virtual_floppy() {
done
fi
+ local NETSHARES="$CONFDIR/netshares"
+ local RUNSCRIPT="$CONFDIR/runscript"
+
## Network shares
# openslx.exe expects network shares line in the following format:
# <path> <letter> <shortcut> <username> <password>
# which is coincidentally the one we received from dmsd :)
- if load_dmsd_resource NETSHARES; then
+ if [ -f "$NETSHARES" ] || load_dmsd_resource NETSHARES; then
if [ -s "${NETSHARES}" ]; then
# try to detect if we are running windows and replace '/' with '\'
# in an attempt to fix an improperly given samba path
@@ -104,7 +107,7 @@ setup_virtual_floppy() {
# Check downloaded runscript and handle options like
# extension, visibility flag, ...
# options are 'key=value' pairs separated with ';'
- if load_dmsd_resource RUNSCRIPT; then
+ if [ -f "$RUNSCRIPT" ] || load_dmsd_resource RUNSCRIPT; then
if [ -s "$RUNSCRIPT" ]; then
IFS=$'\n'
for OPT in $(head -n 1 "$RUNSCRIPT" | tr ";" "\n"); do
@@ -175,8 +178,8 @@ setup_virtual_floppy() {
fi
# Admin supplied runscript(s)
- if [ -d "${VMCHOOSER_DIR}/adminrun" ]; then
- mcopy -s -i "${SLX_FLOPPY_IMG}" "${VMCHOOSER_DIR}/adminrun" "::/"
+ if [ -d "${CONFDIR}/adminrun" ]; then
+ mcopy -s -i "${SLX_FLOPPY_IMG}" "${CONFDIR}/adminrun" "::/"
fi
rm -f -- "${SHARES}" "${TMPDIR}/openslx.ini" "${TMPDIR}/HOSTRES.TXT"