cvs commit: src/lib/libutil Makefile libutil.h pidfile.3 pidfile.c

Robert Watson rwatson at FreeBSD.org
Fri Aug 26 20:55:03 GMT 2005


On Fri, 26 Aug 2005, Doug Barton wrote:

> Frankly, the mtree stuff for BIND to do this is a hack, and I would much 
> rather see this generalized in a useful way in rc.subr. That way all 
> system stuff can just use it, and all ports can use it as they adopt 
> rc.subr style startup scripts. This would not be particularly difficult, 
> if there is wider interest in this, I can whip up a POC. Given that the 
> rc scripts run as root there shouldn't be any permissions problems to 
> overcome. My thought would be to simply default the name of the 
> directory in /var/run to be whatever the name of the script is, and the 
> file itself to be "pid" as named does it.

The nice thing about using mtree is that it uses a data file format to 
hold the parameters -- the owner, group, permissions, etc, rather than 
encoding it in a script.  I.e., that it is explicitly encoded information 
rather than implicit.  Another nice thing about it is that it doesn't rely 
on creating the directory at run-time, but assumes it is part of the base 
install/configuration, and always present.  I'm not generally a fan of 
setting up directory hierarchies by encoding that into scripst and 
programs, but rather making it an explicit entry in our existing directory 
database.

Robert N M Watson


More information about the cvs-src mailing list