Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Nov 2010 12:36:55 -0800
From:      Xin LI <delphij@delphij.net>
To:        freebsd-rc@FreeBSD.ORG
Subject:   RFC: cleartmp: Allow user configurable mtree for /tmp
Message-ID:  <4CEEC8E7.6040102@delphij.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Here is a patch that adds a new variable, tmp_mtree, which allows a user
defined mtree for /tmp.  This is useful when clear_tmp_enable="YES" and
some directories are needed to be exist in /tmp before services is started.

Cheers,
- -- 
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJM7sjnAAoJEATO+BI/yjfBocwH/ioFHWajIJba4oGrhbqPORMJ
tK3eezclwvWaMCXDImS7ZqOYxr0ZjYWuQn3bt0tRluyKXq/T5A+8e109YCctvyHf
lCOL1N9jmCcJCQflmbxNql3VHacbm08ltNWQi8FHzNReg9Q+4bXWL7ewje1By0Zb
t/VQooF4192QTAZFWNf1HX7ZNXTbWsEBS6BVgVlXKl0+H3R/huMeujlZWR+288VQ
mqBiPezxzETNzU2oKVbKH2RzXD07IYYfCmkOHODYkhJdhw/Rrq9m3y10jdJGzekY
aZ6hlCrnYZRaeYkD/MJ0Jn9nab+fwLn0pqwWeVxVvx1KfvB5SFkn4QAbg3ShVDI=
=eX7S
-----END PGP SIGNATURE-----

[-- Attachment #2 --]
Index: cleartmp
===================================================================
--- cleartmp	(revision 215822)
+++ cleartmp	(working copy)
@@ -54,6 +54,9 @@
 		# Create X related directories with proper permissions.
 		mkdir -m 1777 ${x11_socket_dirs}
 	fi
+	if [ -n "${tmp_mtree}" ]; then
+		/usr/sbin/mtree -deU -f ${tmp_mtree} -p /tmp > /dev/null
+	fi
 }
 
 load_rc_config $name

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