RFC: cleartmp: Allow user configurable mtree for /tmp
Xin LI
delphij at delphij.net
Thu Nov 25 20:37:23 UTC 2010
-----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 at 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-----
-------------- next part --------------
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
More information about the freebsd-rc
mailing list