Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 May 2007 18:53:11 +0200
From:      Christoph Schug <chris+freebsd-questions@schug.net>
To:        sac <sacchi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Why doesn't FreeBSD clear /tmp on bootup?
Message-ID:  <20070503165311.GE3138@voodoo.schug.net>
In-Reply-To: <e14997e00705030937h50cedea7j1978de09f37542ca@mail.gmail.com>
References:  <e14997e00705030937h50cedea7j1978de09f37542ca@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 03, 2007, sac wrote:

> I've seen OpenBSD and some other variants of Unix clearing /tmp on
> bootup. But FreeBSD doesn't seem to do so.

This one is configurable in /etc/rc.conf, take a look at
/etc/defaults/rc.conf for default settings and explanations:

| clear_tmp_enable="NO"   # Clear /tmp at startup.
| clear_tmp_X="YES"       # Clear and recreate X11-related directories in /tmp

OTOH you can configure /tmp/ as memory file system (which is clear with
every reboot cause of its nature) using settings like

| tmpmfs="YES"
| tmpsize="128m"
| tmpmfs_flags="-S"

in /etc/rc.conf (in this example 128 MB of /tmp without soft-updates).

-cs




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070503165311.GE3138>