Repository navigation
Conversation
The OldUnreal 469 patch uses ~/.utpg as a per-user directory on Linux unless started with -nohomedir. Any ini the engine creates or saves (mutator configs such as ACE or map vote, User.ini) was written to ~/.utpg/System instead of serverfiles/System, and ucc.log and the per-match ngLog files went to ~/.utpg, where LinuxGSM never rotated them. Start UT99 with -nohomedir, as ut2k4 and ut3 already do. A new pre-start fix_ut99.sh moves any ini left in ~/.utpg/System into the System directory so existing servers keep their settings. Those files were the copies the server was reading, since 469 looks in the home directory first; a stock file they replace is kept as a numbered backup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The OldUnreal 469 patch uses
~/.utpgas a per-user directory on Linux. Unless the server is started with-nohomedir(found inCore.so, along withSETHOMEDIR=), every ini the engine creates or saves goes to~/.utpg/System, notserverfiles/System. This is why mutators that write their own ini (ACE, map vote, NewNet and so on) seem to write nothing: the file is created, but in~/.utpg/System, where nobody looks. 469 also looks for inis in the home directory beforeSystem, so a copy there silently overrides the one admins edit.The same directory also explains the large
~/.utpgseen on servers.ucc.logand the per-match ngLog stats files go to~/.utpg/Logsand~/.utpg/NetGamesUSA.com, while LinuxGSM's game log dir (serverfiles/Logs) stays empty and log rotation never touches them. On one long-running server this was about 544 MB (272 MB of ngLogs in each folder, 271 files), plus aUser.inithe server had written there.Changes:
ut99server/_default.cfg: add-nohomedirtostartparameters, asut2k4andut3already do.fix_ut99.sh: whenstartparametershas-nohomedir, it moves any*.inileft in~/.utpg/Systeminto${systemdir}, so existing servers keep their mutator settings andUser.ini. The home copy was the one the server actually read, so it wins. A file it replaces inSystem(for example the stockUser.ini) is kept as a numbered backup (User.ini.~1~). Once the files are moved, the fix does nothing on later starts.core_modules.shandfix.sh.Old logs in
~/.utpg/Logsand~/.utpg/NetGamesUSA.comare not moved. Admins can delete~/.utpgonce the server has started on this version.Backups (#5129): after this change UT99 keeps its config under serverfiles, which
backupalready covers, so nofn_backup_extradirsentry is needed.Fixes #3835
Affected servers: ut99
Type of change
Testing
gameservermanagers/gameserver:ut99container (469f RC6) on a test server, current develop. Afterstart,~/.utpg/Systemhelducc.logand~/.utpg/Logsheld the ngLog, whileserverfiles/Logswas empty.ucc-bin serverwith anini=anduserini=that did not exist yet. Without-nohomedirboth files were created in~/.utpg/System. With-nohomedirboth were created inserverfiles/System. An strace of a normal start showedUser.inilooked up in~/.utpg/Systemfirst, thenSystem.~/.utpg/Systemwith a mutator-styleACE4835.iniand a modifiedUser.ini, as an existing server would have. Then swapped in this branch's modules and_default.cfg, and ranstart.restart, then a direct gamedig query on the container IP, thenmonitor.startprintedApplying move ACE4835.ini ...andApplying move User.ini .... Both files are now inserverfiles/Systemwith their settings, and the stockUser.iniwas kept asUser.ini.~1~(md5 unchanged).ucc-bin server DM-Deck16][.unr ini=.../ut99server.ini -nohomedir.ucc.logis now inserverfiles/System, and new ngLogs go toserverfiles/Logsandserverfiles/NetGamesUSA.com.restartapplied no further moves. The query answered (LinuxGSM,DM-Deck16][, 0/10).monitordid not restart the server (start time unchanged).ucc makecould not be used to build a real test mutator: in 469f RC6 on Linux it recurses into./until the stack overflows. That is an engine bug, unrelated to this change. Theini=/userini=test exercises the same "create a new ini" path that mutators use.Risk and rollback
serverfiles/System. 469 falls back toSystemwhen the home directory has no copy, so they keep working without-nohomedir.Breaking changes
Note: instances that override
startparametersin their own config need to add-nohomedirthemselves. Until they do, the fix module leaves~/.utpgalone.Documentation
Checklist
PR will not be merged until all steps are complete.
Thank you for your Pull Request!