From owner-freebsd-current@FreeBSD.ORG Mon Apr 2 22:22:44 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 2DFE0106564A for ; Mon, 2 Apr 2012 22:22:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 75FA214DF23; Mon, 2 Apr 2012 22:22:41 +0000 (UTC) Message-ID: <4F7A26B1.9070502@FreeBSD.org> Date: Mon, 02 Apr 2012 15:22:41 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: d@delphij.net References: <4F746F1E.6090702@mail.zedat.fu-berlin.de> <4F74CBA2.2010809@delphij.net> In-Reply-To: <4F74CBA2.2010809@delphij.net> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "O. Hartmann" , Current FreeBSD , Xin Li , Chris Rees Subject: Re: Using TMPFS for /tmp and /var/run? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 22:22:44 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 03/29/2012 13:52, Xin Li wrote: > On 03/29/12 09:41, Chris Rees wrote: >> On 29 Mar 2012 16:49, "O. Hartmann" >> wrote: >>> >>> I was wondering if there are some objections using TMPFS for >>> /tmp and /var/run. I figured out some problems with some rc.d >>> scripts when using TMPFS for /var/run, samba and OpenLDAP do >>> store some informations like PID in a subfolder of their own in >>> /var/run, but the rc.d scripts are not checking properly the >>> existence of the appropritae folder (unlike "dbus" and "hald", >>> they check properly!). >>> >>> I already submitted two PRs, but for SAMBA, my "hack" is >>> trivial and obviously to clumsy, so it should be check >>> properly. >>> >>> My question is whether there are objections using TMPFS for >>> bot /tmp/ and /var/run/ at this stage on FreeBSD >>> 10.0-CURRENT/amd64? > >> Any rc script that complains about an empty /var/run is buggy- >> it should be assumed that it will be emptied on boot. > > Agreed. We may want a generic way of registering custom mtrees > (or something) that creates the hierarchy on boot, by the way. > > Currently this has to be done by individual rc.d scripts if they > need a separate directory. I think there is some confusion here, so hopefully I can help clear it up. For BASE rc.d scripts, definitions for needed subdirectories and their permissions for /var/run are located in /etc/mtree/BSD.var.dist, which is called by /etc/rc.d/var at boot time. Anything IN THE BASE that complains about a missing directory in /var/run needs to be fixed, and should be reported. For PORTS rc.d scripts, they are expected to create (or check for the existence of) the needed directories/permissions *in the script* (not at port/package install time, this is why). Any variations on that theme should also be reported. In short, there is nothing in rc.d (ports or base) that should fail if you start with an empty /var/run. If it does, it's a bug. Meanwhile, as much as I find it personally distasteful, I can't imagine us changing the default for clear_tmp_enable at this point. hth, Doug - -- This .signature sanitized for your protection -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJPeiaxAAoJEFzGhvEaGryEefQH/14QUKTun4njDF6YHHPlBcqz 1Ky97Dlu3cka9rNee8y7aJWSK61mg/OjacjgViKrrA6isOg/wsaJ6qK9XCk1Npb/ ZKEvszPvdHcdy+XA78HS/UTa1Pqxx+H6UPiF2s0f80LkP468UthfszXXhw8jJbSh dWG9OluprWd/21iHco5S/V+i0zgcEHHkdWAT+N5+w4Cw8cUiVk+hV90YpUK9PnO4 bzfvqppP9tCdnt9J/q8bUwNy4iK3orfSMRZ5SFFpKqeUTI4fbY3CuZHsEXf1AXQI LhVlRoCa35exFv5k9ivJ3IJMorNsLSulXluCrULn38yvtlRSazWWFCcVha18mbs= =cPrk -----END PGP SIGNATURE-----