summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmchooser/data
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/vmchooser/data')
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt4
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart10
2 files changed, 12 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 43880a2c..2d6dfb41 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -485,8 +485,8 @@ else
fi
if [ -z "$vm_diskfile" ]; then
- new_vmpath=$(ls "${vmpath}.r"* | grep -E '\.r[0-9]+$' | grep -o -E '[0-9]+' | sort -n | tail -1)
- [ -n "$new_vmpath" ] && vmpath="$vmpath$new_vmpath"
+ new_vmpath=$(ls "${vmpath}.r"* | grep -E -o '\.r[0-9]+$' | grep -o -E '[0-9]+' | sort -n | tail -1)
+ [ -n "$new_vmpath" ] && vmpath="${vmpath}.r${new_vmpath}"
vm_diskfile="$vmpath"
fi
diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart b/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart
new file mode 100755
index 00000000..aa7e54c6
--- /dev/null
+++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart
@@ -0,0 +1,10 @@
+#!/bin/ash
+
+SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d"
+
+if [ -d "$SOURCEPATH" ]; then
+ for file in $SOURCEPATH/*; do
+ . "$file" || slxlog "vmchooser-sessionstart" "Could not source $file at session start!" "$file"
+ done
+fi
+