[Bug 212493] /etc/rc.subr's new limits + chdir will cause limits to run on chdir instead of _doit
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Sep 8 18:02:07 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212493
Bug ID: 212493
Summary: /etc/rc.subr's new limits + chdir will cause limits to
run on chdir instead of _doit
Product: Base System
Version: 11.0-STABLE
Hardware: Any
OS: Any
Status: New
Keywords: needs-qa, patch-ready
Severity: Affects Only Me
Priority: ---
Component: misc
Assignee: freebsd-bugs at FreeBSD.org
Reporter: Ultima1252 at gmail.com
Created attachment 174540
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=174540&action=edit
rc.subr.diff
Recently I was having issues with a port after upgrading from 10.3 to 11. (This
bug also exists on head) When the chdir var is used, the limits command will be
prepended to chdir instead of the prog. This can, and in my case caused the cd
command to fail and the program will fail to start.
i'm going to omit much of the debugging info and paste the useful points.
Current rc.subr:
+ _doit='limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp
/var/db/teamspeak/teamspeak_server.pid -u teamspeak
/usr/local/libexec/ts3server dbsqlpath=/usr/local/share/teamspeak/server/sql/
inifile=/usr/local/etc/teamspeak/ts3server.ini
licensepath=/usr/local/etc/teamspeak/ logpath=/var/log/teamspeak'
+ _run_rc_doit 'limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp
/var/db/teamspeak/teamspeak_server.pid -u teamspeak
/usr/local/libexec/ts3server dbsqlpath=/usr/local/share/teamspeak/server/sql/
inifile=/usr/local/etc/teamspeak/ts3server.ini
licensepath=/usr/local/etc/teamspeak/ logpath=/var/log/teamspeak'
+ debug 'run_rc_command: doit: limits -C daemon cd /var/db/teamspeak &&
/usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak
/usr/local/libexec/ts3server dbsqlpath=/usr/local/share/teamspeak/server/sql/
inifile=/usr/local/etc/teamspeak/ts3server.ini
licensepath=/usr/local/etc/teamspeak/ logpath=/var/log/teamspeak'
+ eval 'limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp
/var/db/teamspeak/teamspeak_server.pid -u teamspeak
/usr/local/libexec/ts3server dbsqlpath=/usr/local/share/teamspeak/server/sql/
inifile=/usr/local/etc/teamspeak/ts3server.ini
licensepath=/usr/local/etc/teamspeak/ logpath=/var/log/teamspeak'
+ limits -C daemon cd /var/db/teamspeak
+ /usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak
/usr/local/libexec/ts3server 'dbsqlpath=/usr/local/share/teamspeak/server/sql/'
'inifile=/usr/local/etc/teamspeak/ts3server.ini'
'licensepath=/usr/local/etc/teamspeak/' 'logpath=/var/log/teamspeak'
Attached, I have created a small change to rc.subr that fixes this issue.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list