aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2020-07-19 23:54:00 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2020-07-19 23:54:00 +0000
commite17f5b1d307b7b8910d67883e57a9604305906d5 (patch)
tree5a9f9551abafa2e64f176c905f7d04c25772ae5e /libexec/rc
parentcf5cd89c3a93eb41213a0fe83be7ff79c3d9bb63 (diff)
Notes
Diffstat (limited to 'libexec/rc')
-rwxr-xr-xlibexec/rc/rc.d/tmp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp
index 3b75ec0338ef2..56da6b498ad57 100755
--- a/libexec/rc/rc.d/tmp
+++ b/libexec/rc/rc.d/tmp
@@ -41,6 +41,9 @@ load_rc_config $name
mount_tmpmfs()
{
if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then
+ if test -w /tmp/. && checkyesno tmpmfs_clear_mnt; then
+ (cd /tmp/. && rm -rf .* *)
+ fi
mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
chmod 01777 /tmp
fi