summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2023-08-04 11:54:50 +0200
committerSimon Rettberg2023-08-04 11:54:50 +0200
commitf7f9f570d8102ad2f266aa6cdf90918ba222de15 (patch)
treef1e9bd263b477eaedd7337a1ce9f8035e808c892 /core
parent[debug-report-bwlp] Check for --kill-after, fix indentation (diff)
downloadmltk-f7f9f570d8102ad2f266aa6cdf90918ba222de15.tar.gz
mltk-f7f9f570d8102ad2f266aa6cdf90918ba222de15.tar.xz
mltk-f7f9f570d8102ad2f266aa6cdf90918ba222de15.zip
[vmchooser2] Simplify check, avoid bogus warning if non-numeric
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/vmchooser2/data/opt/openslx/bin/vmchooser2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser
index d80fce26..9bcc2b5a 100755
--- a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser
+++ b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser
@@ -36,7 +36,7 @@ if [ -n "$HW_ID44" ] && ! [ "$HW_ID44" -gt 9000 ]; then # Use negation so NaN ->
HW_MBRAM=$(( ( HW_MBRAM * 3 ) / 4 ))
fi
-if [ -n "$SLX_VMCHOOSER_TAB" ] && [ "$SLX_VMCHOOSER_TAB" -ge 0 ] && [ "$SLX_VMCHOOSER_TAB" -le 2 ] 2>/dev/null; then
+if [[ "$SLX_VMCHOOSER_TAB" =~ ^[012]$ ]]; then
TAB="$SLX_VMCHOOSER_TAB"
elif (( HW_MBRAM < 5000 )); then # Check RAM size; if it's not that much, default to the native linux sessions
TAB=0