summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
Diffstat (limited to 'remote')
-rwxr-xr-xremote/modules/vmchooser2/data/opt/openslx/bin/vmchooser14
1 files changed, 9 insertions, 5 deletions
diff --git a/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser
index 4f30f447..a99207ff 100755
--- a/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser
+++ b/remote/modules/vmchooser2/data/opt/openslx/bin/vmchooser
@@ -16,7 +16,7 @@ else
fi
MEM=$(grep -m1 '^MemTotal:' /proc/meminfo | awk '{print $2}')
-if [ -n "$SLX_VMCHOOSER_TAB" ] && [ "$SLX_VMCHOOSER_TAB" -ge 0 -a "$SLX_VMCHOOSER_TAB" -le 2 ]; then
+if [ -n "$SLX_VMCHOOSER_TAB" ] && [ "$SLX_VMCHOOSER_TAB" -ge 0 -a "$SLX_VMCHOOSER_TAB" -le 2 ] 2>/dev/null; then
TAB="$SLX_VMCHOOSER_TAB"
elif [ "$MEM" -lt 3000000 ]; then # Check RAM size; if it's not that much, default to the native linux sessions
TAB=0
@@ -24,9 +24,13 @@ else
TAB=2
fi
-if [ -n "$SLX_VM_POOL_FILTER" ]; then
- exec vmchooser.real "$@" --url "$URL" --pool "$SLX_VM_POOL_FILTER" --fullscreen --tab "$TAB"
-else
- exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB"
+EXTRA=
+[ -n "$SLX_VMCHOOSER_TEMPLATES" ] && EXTRA="$EXTRA --template-mode $SLX_VMCHOOSER_TEMPLATES"
+[ -n "$SLX_VMCHOOSER_FORLOCATION" ] && EXTRA="$EXTRA --location-mode $SLX_VMCHOOSER_FORLOCATION"
+
+if [ -z "$SLX_LOCATIONS" ]; then
+ exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" $EXTRA
fi
+exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" --locations "$SLX_LOCATIONS" $EXTRA
+