LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[Bug]: info_distro.sh [: : integer expression expected

Open Scott-GMI opened this issue 2 years ago • 1 comments

User story

After updating Survive the Nights to Version v 23.7.1 we started to see this error >> [: : integer expression expected <<. Command(s) run - just prints this error to the terminal. Have about 10 other servers running an older version (23.6.2) and I do not see this error.

Game

Survive the Nights on Rocky Linux 9.2

Linux distro

Other

Command

command: start, command: details

Further information

[stnserver@mcgs-002 ~]$ ./stnserver stop [ OK ] Stopping stnserver: Graceful: CTRL+c: 9: OK [stnserver@mcgs-002 ~]$ ./stnserver start [ .... ] Starting stnserver: /home/stnserver/lgsm/modules/info_distro.sh: line 100: [: : integer expression expected [ OK ] Starting stnserver: MCGC - STN Server

[stnserver@mcgs-002 ~]$ ./stnserver dt /home/stnserver/lgsm/modules/info_distro.sh: line 100: [: : integer expression expected

Distro Details

Date: Tue Dec 26 08:09:22 PM EST 2023 Distro: Rocky Linux 9.2 (Blue Onyx) Arch: x86_64 Kernel: 5.14.0-284.30.1.el9_2.x86_64 Hostname: mcgs-002 Environment: xen Uptime: 58d, 3h, 11m tmux: 3.2a glibc: 2.34

Relevant log output

No response

Steps to reproduce

No response

Scott-GMI avatar Dec 27 '23 01:12 Scott-GMI

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 06 '24 02:01 Scott-GMI