[Bug]: Checks that fail before the log directory exists exit with 0
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
调研方向
从 check_system_dir.sh、check_executable.sh、core_steamcmd.sh 和 core_exit.sh 开始;然后追踪 check.sh 在 check_logs.sh 创建日志目录之前按什么顺序执行这些检查。确认日志目录不存在时每种已报告故障的退出码,包括公共 IP 查询失败或模块下载失败。无论日志目录是否存在,检查都返回预期的非零状态,即为完成。
由索引模型根据 Issue 内容生成。
描述
Severity
severity: low
Reproducibility
reproducible: always
Regression
regression: no
Affects latest release
latest-release: yes
User story
As a server admin who runs LinuxGSM from scripts, I want a failed check to return a non-zero exit code even when the log directory does not exist yet, so that the failure is not reported as success.
Script name
ts3server (any server is affected)
Game
Teamspeak 3
Linux distro
Debian 13
Command
command: start
Expected behavior
Cannot access .../serverfiles: No such directory and executable was not found exit with 1, as they do once the log directory exists.
Actual behavior
If the log directory does not exist (a new instance before install, a deleted log directory, or an LGSM_LOGDIR that does not exist), these checks print [ FAIL ] but exit with 0. If the public IP lookup failed, they exit with 2.
Further information
check_system_dir.sh, check_executable.sh and fn_check_steamcmd_user (core_steamcmd.sh) call fn_script_log_fail only if [ -d "${lgsmlogdir}" ], and only fn_script_log_fail sets exitcode=1. core_exit.sh then exits with whatever an earlier step left: the public IP lookup in info_game.sh (0, or 2 when it fails), or the local exitcode in fn_fetch_file (0) when the module was downloaded on this run. check.sh runs these checks before check_logs.sh, which creates the log directory. fn_script_log already skips writing when the log directory is missing, so the guard is not needed. check_root.sh has the same guard but sets exitcode=1 itself. Related: #5191.
Pre-checks
- I ran update and validate before reporting this issue.
Not run: reproduced on a new develop instance, which has nothing to update or validate yet.
Relevant log output
# New ts3server instance from develop (eb8f34ae), Debian 13 (WSL2).
$ ./ts3server start; echo $?
[ FAIL ] Starting ts3server: Cannot access /home/borzaka/lgsm-test/.../serverfiles: No such directory
0
# Installed instance, log directory and executable removed:
$ ./ts3server start; echo $?
[ FAIL ] Starting ts3server: executable was not found
* /home/borzaka/lgsm-test/.../serverfiles/ts3server
0
Steps to reproduce
- Create a new instance:
curl -Lo linuxgsm.sh https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/develop/linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh ts3server. - Without installing, run
./ts3server start; echo $?(orstop,monitor). It prints[ FAIL ] ... Cannot access .../serverfilesand 0. - On an installed instance (log directory present), move
serverfilesaway and run./ts3server start; echo $?. The same error exits with 1. Movelogaway too and it exits with 0 again.
🤖 Generated with Claude Code
- 主要语言
- Shell
- 星标
- 4.9k
- 派生
- 870
- 平均合并
- 18 小时 44 分钟
- 30 天内合并 PR
- 148
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GameServerManagers/LinuxGSM 的其他 Issue
-
command: start engine: unreal4 game: The Front reproducible: always severity: medium type: bug
难度 1/5 1 小时以内 新手友好度 86/100
GameServerManagers/LinuxGSM#5185 ·
维护者通常 1 天内回复
-
bug(ins): server fails to start, srcds_run has CRLF line endings and needs bash可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭distro: Ubuntu engine: source game: Insurgency status: fixed in develop
难度 2/5 1-3 小时 新手友好度 72/100
GameServerManagers/LinuxGSM#5153 ·
维护者通常 1 天内回复
-
[Bug]: cs2server ignores the GSLT entered during install可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭command: install command: start distro: Debian engine: source2 game: Counter-Strike 2 regression: yes reproducible: always severity: high type: bug
难度 2/5 1-3 小时 新手友好度 82/100
GameServerManagers/LinuxGSM#5106 ·
维护者通常 1 天内回复
-
[Bug]: A failed command exits with 0 when core_exit.sh is downloaded on exit可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭command: start distro: Debian engine: null game: Teamspeak 3 info: tmux reproducible: always severity: low status: fixed in develop type: bug
难度 3/5 1-2 天 新手友好度 35/100
GameServerManagers/LinuxGSM#5191 ·
维护者通常 1 天内回复
-
[Bug]: install passes a leftover forcedl value instead of each server's force setting可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭command: install info: steamcmd reproducible: unable severity: low status: fixed in develop type: bug
难度 1/5 1 小时以内 新手友好度 25/100
GameServerManagers/LinuxGSM#5189 ·
维护者通常 1 天内回复
查看 GameServerManagers/LinuxGSM 的全部 Issue
相似的 Issue
-
Isha Narula未关闭
难度 1/5 1 小时以内 新手友好度 72/100
dataplat/DataSpeakers#178 ·
-
[BUG] mo clean deletes Cypress test runner binaries in ~/Library/Caches/Cypress可能已有人在做 @viniciusdsandrade 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
enhancement security severity:low
难度 2/5 1-3 小时 新手友好度 83/100
Battle-Cattle/BCUK-Bot-4#959 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
mattabate/life-distributable#153 ·
维护者通常 1 天内回复