LinuxGSM
LinuxGSM copied to clipboard
[ .... ] lgsm/modules/info_distro.sh: line 100: [: : integer expression expected
User story
When i start all game servers appear lgsm/modules/info_distro.sh: line 100: [: : integer expression expected
Game
All lgsm games
Linux distro
RedHat 7, Other
Command
command: start, command: restart, command: details, command: update, command: validate, command: debug
Further information
Hello, i have centos 7 and rh 7, when i start any game server with these distro appear the error:
lgsm/modules/info_distro.sh: line 100: [: : integer expression expected
Anyway the server seems to start correctly. I would like to know if it's normal. Thank you.
Relevant log output
lgsm/modules/info_distro.sh: line 100: [: : integer expression expected
Steps to reproduce
any start of lgsm servers in red hat like.
Posted the same issue a month back - #4428
The following worked for me for Rocky Linux 9.2
Line 98 in info_distro.sh
elif [[ "${distroidlike}" == "rhel" ]] || [ "${distroid}" == "rhel" ]; then
Changed to
elif [ "${distroidlike}" == "rhel" ] || [ "${distroid}" == "rhel" ]; then
This fixed the error -> line 100: [: : integer expression expected
Changing the [[ ]] to [ ] @ line 98 looks to be the fix.
Indeed, this modification works. I propose to the developers if it is possible to correct it because when the update-lgsm is performed again, the file with the bug is restored with the double square brackets.
Morning, I have popped that in the queue to take a look. Should be a minor fix. Thanks
The real problem should be in line 34, it uses 2 variables which are empty till line 37.
It will work on my system if i move line 37 and 38 upward to be executed before the if statement.