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

Brooks Davis brooks at one-eyed-alien.net
Thu Aug 25 16:55:03 GMT 2005


On Thu, Aug 25, 2005 at 05:12:04PM +0100, Robert Watson wrote:
> 
> On Thu, 25 Aug 2005, John-Mark Gurney wrote:
> 
> >>Something I'd very much like to see is for daemon pid files to start 
> >>being placed in /var/run/<daemon>/<daemon>.pid, as opposed to directly 
> >>in /var/run.  This will allow us to set specific ownership on the 
> >>parent directory for a pid file, so that privilege is not required to 
> >>write out a pid file in a safe place.
> >
> >why not add an rc.subr option to precreate the file with the correct 
> >user?  I was running up conserver, and I decided to run it as a seperate 
> >user, and since I created it as owned by the conserver user, conserver 
> >just opened and wrote to the file..
> 
> We already actually run bind with a pid file in /var/run/named.  I'm not 
> sure we need a whole lot of magic, other than having mtree create the 
> directories for base system components, and packages/ports create them for 
> third party components.

Ports and packages have to do this in their startup scripts because they
must assume /var contains nothing more then they get from:

b_populate_var()
{
        /usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null
        case ${sendmail_enable} in
        [Nn][Oo][Nn][Ee])
                ;;
        *)
                /usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null
                ;;
        esac
}

This is probably a good idea for system daemons, but I'm not sure
there's much point in encouraging it for ports.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20050825/404fddfa/attachment.bin


More information about the cvs-all mailing list