LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[ .... ] lgsm/modules/info_distro.sh: line 100: [: : integer expression expected

Open bluenor opened this issue 1 year ago • 4 comments

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.

bluenor avatar Jan 25 '24 14:01 bluenor

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.

Scott-GMI avatar Jan 25 '24 17:01 Scott-GMI

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.

bluenor avatar Jan 26 '24 07:01 bluenor

Morning, I have popped that in the queue to take a look. Should be a minor fix. Thanks

dgibbs64 avatar Jan 26 '24 09:01 dgibbs64

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.

BertBrenner avatar Feb 05 '24 19:02 BertBrenner