|Summary:||RFE: better use of functions in /etc/rc.d/init.d/functions|
|Product:||[Fedora] Fedora||Reporter:||Chris Adams <linux>|
|Component:||initscripts||Assignee:||Miloslav Trmač <mitr>|
|Status:||CLOSED RAWHIDE||QA Contact:||Brock Organ <borgan>|
|Fixed In Version:||8.22-1||Doc Type:||Enhancement|
|Doc Text:||Story Points:||---|
|Last Closed:||2006-02-01 18:06:56 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
|Bug Depends On:|
Description Chris Adams 2002-04-14 00:37:30 UTC
I'm building RPMs for some daemons that don't store their PID file in /var/run (for example, one does not run as root so doesn't have permission). There is some code duplication in /etc/rc.d/init.d/functions, especially with respect to finding the PID of a program. If everything used pidfileofproc() instead of doing the lookup itself, it would make it much easier to handle daemons with non-standard PID file locations (just override pidfileofproc() instead of having to override a bunch of other things as well). Also, it would be nice to have an option to daemon() to not limit core dump size to zero. I was debugging a daemon, and I explicitly unlimited core dump size (after making sure that it was in a safe directory, etc.), but I didn't realize for quite a while that daemon() set core dump size to zero. That is a sensible default, but it would be nice to be able to easily override it (otherwise, I have to write all my init scripts to not use the Red Hat provided functions).
Comment 1 Pekka Savola 2003-07-22 10:33:28 UTC
FWIW, seems a sensible approach. Further, the initscripts could be extended to look at pid files under in /var/run/*/*.pid, for exactly the reason stated. I maintain one package (radvd) which uses /var/run/radvd/radvd.pid because of the permissions problem.
Comment 2 Miloslav Trmač 2006-01-26 03:10:31 UTC
Created attachment 123705 [details] Remaining patch for redhat-lsb
Comment 3 Miloslav Trmač 2006-02-01 18:06:56 UTC
There is somewhat less code repetition in initscripts-8.22-1, and the pid file location can be changed. Core dump size can be defined using $DAEMON_COREFILE_LIMIT. Thanks for your report.
Comment 4 Chris Adams 2006-02-01 18:23:31 UTC
Thanks. I like using an environment variable for the core file limit; I can override it for debugging without having to edit scripts that way.