diff options
author | Simon Rettberg | 2022-10-04 12:29:39 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-10-04 12:29:39 +0200 |
commit | 72c992f566f11b9b9a7bf32ea6307c08c535bacd (patch) | |
tree | bd39040b9ff2c655161d3ce5a58d68180156f2bd | |
parent | [dnbd3-proxy-mode] Avoid double-reboots (diff) | |
download | mltk-72c992f566f11b9b9a7bf32ea6307c08c535bacd.tar.gz mltk-72c992f566f11b9b9a7bf32ea6307c08c535bacd.tar.xz mltk-72c992f566f11b9b9a7bf32ea6307c08c535bacd.zip |
[vmchooser2] Fix number range check for non-numbers
-rwxr-xr-x | core/modules/vmchooser2/data/opt/openslx/bin/vmchooser | 2 |
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 37cf6800..d80fce26 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 >= 0 && SLX_VMCHOOSER_TAB <= 2 )) 2>/dev/null; then +if [ -n "$SLX_VMCHOOSER_TAB" ] && [ "$SLX_VMCHOOSER_TAB" -ge 0 ] && [ "$SLX_VMCHOOSER_TAB" -le 2 ] 2>/dev/null; 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 |