Date: Thu, 23 May 2024 13:34:22 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 279251] games/minetest: Fix rc(8) script when using minetest_flags Message-ID: <bug-279251-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279251 Bug ID: 279251 Summary: games/minetest: Fix rc(8) script when using minetest_flags Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: amdmi3@FreeBSD.org Reporter: DtxdF@disroot.org Assignee: amdmi3@FreeBSD.org Flags: maintainer-feedback?(amdmi3@FreeBSD.org) Created attachment 250900 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250900&action= =3Dedit minetest.in.patch Description: After installing `games/minetest_game` and enabling the `rc(8)` script, it fails because I need to set the `--gameid` parameter. I set `minetest_flags= `, which is theoretically the parameter that fixes the problem, but of course since `command` is set to `/usr/sbin/daemon`, those arguments are passed to `daemon(8)` instead of `minetest(6)`. To fix this problem we need to change minetest_flags to minetest_cli_args a= fter applying this patch. Steps to reproduce this issue: ``` # service minetest oneenable minetest enabled in /etc/rc.conf # service minetest start Starting minetest. # service minetest status minetest is not running. # tail /var/log/minetest/debug.log ------------- Separator ------------- 2024-05-23 09:20:05: ERROR[Main]: To run a Minetest server, you need to sel= ect a game using the '--gameid' argument. 2024-05-23 09:20:05: ERROR[Main]: Check out https://content.minetest.net fo= r a selection of games to pick from and download. 2024-05-23 09:20:05: ERROR[Main]: ServerError: Supplied invalid gamespec # sysrc minetest_flags=3D"--gameid minetest_game" minetest_flags: -> --gameid minetest_game # service minetest start Starting minetest. daemon: unrecognized option `--gameid' usage: daemon [-cfHrS] [-p child_pidfile] [-P supervisor_pidfile] [-u user] [-o output_file] [-t title] [-l syslog_facility] [-s syslog_priority] [-T syslog_tag] [-m output_mask] [-R restart_delay_secs] command arguments ... --change-dir -c Change the current working directory to r= oot --close-fds -f Set stdin, stdout, stderr to /dev/null --sighup -H Close and re-open output file on SIGHUP --syslog -S Send output to syslog --output-file -o <file> Append output of the child process to file --output-mask -m <mask> What to send to syslog/file 1=3Dstdout, 2=3Dstderr, 3=3Dboth --child-pidfile -p <file> Write PID of the child process to file --supervisor-pidfile -P <file> Write PID of the supervisor process to fi= le --restart -r Restart child if it terminates (1 sec del= ay) --restart-delay -R <N> Restart child if it terminates after N sec --title -t <title> Set the title of the supervisor process --user -u <user> Drop privileges, run as given user --syslog-priority -s <prio> Set syslog priority --syslog-facility -l <flty> Set syslog facility --syslog-tag -T <tag> Set syslog tag --help -h Show this help /usr/local/etc/rc.d/minetest: WARNING: failed to start minetest ``` After applying this patch: ``` # service minetest oneenable minetest enabled in /etc/rc.conf # sysrc minetest_cli_args=3D"--gameid minetest_game" minetest_cli_args: -> --gameid minetest_game # service minetest start Starting minetest. # service minetest status minetest is running as pid 57541. # tail /var/log/minetest/debug.log=20 ------------- Separator ------------- 2024-05-23 09:31:43: [Main]: Using game specified by --gameid on the command line 2024-05-23 09:31:43: ACTION[Main]: World at [/var/db/minetest/world] 2024-05-23 09:31:43: ACTION[Main]: Server for gameid=3D"minetest_game" list= ening on 0.0.0.0:30000. ``` --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279251-7788>