diff options
author | Simon Rettberg | 2022-11-10 10:29:11 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-11-10 10:29:11 +0100 |
commit | 1a45021f030c1ff3a900c75133c4b7ba06559d59 (patch) | |
tree | 2e5c3687ab535d355e94d5f2cfd6a7036ff5a10f /core/modules/vbox-src/data/opt/openslx | |
parent | [pvs2] Log output to /tmp (diff) | |
download | mltk-1a45021f030c1ff3a900c75133c4b7ba06559d59.tar.gz mltk-1a45021f030c1ff3a900c75133c4b7ba06559d59.tar.xz mltk-1a45021f030c1ff3a900c75133c4b7ba06559d59.zip |
[vbox-src] Fix broken math expression, use (( ))
Diffstat (limited to 'core/modules/vbox-src/data/opt/openslx')
-rwxr-xr-x | core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc index d29fac20..6c0a6d7f 100755 --- a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc +++ b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc @@ -107,8 +107,8 @@ set_hardware_limits() { # use HW_CORES not HW_THREADS since virtualbox does not # seem to handle hyperthreading all too well... declare -g CPU_CORES="${HW_CORES:-1}" - [ "${CPU_CORES}" -gt "{MAXCORES}" ] && CPU_CORES="${MAXCORES}" - [ "${VM_MEM}" -gt "${MAXMEM}" ] && VM_MEM="${MAXMEM}" + (( CPU_CORES > MAXCORES )) && CPU_CORES="${MAXCORES}" + (( VM_MEM > MAXMEM )) && VM_MEM="${MAXMEM}" # currently not used, keep the VRAMSize setting from the uploaded configuration declare -rg GUESTVRAM=$MAXVRAM @@ -116,7 +116,7 @@ set_hardware_limits() { # check if shared folders should be activated according # to SHARE_REMAP_MODE set by /opt/openslx/inc/shares VBOX_SHARED_FOLDERS= - if [ "x$SHARED_FOLDERS" != "xFALSE" ] && [ "$SHARE_REMAP_MODE" -gt 1 ]; then + if [ "${SHARED_FOLDERS^^}" = "TRUE" ] && (( SHARE_REMAP_MODE > 1 )); then declare -rg VBOX_SHARED_FOLDERS="1" fi return 0 |