summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authordaichi <daichi@FreeBSD.org>2010-09-05 05:44:40 +0000
committerdaichi <daichi@FreeBSD.org>2010-09-05 05:44:40 +0000
commita672b2d6691ebb601cf230fd4160bd5051ad108b (patch)
treea1e61cd8fe658017f64ab4629eeee69cfe420842 /etc/rc.d
parent6f5cfa0928d7e16b144d20cd0f802f09e20eda42 (diff)
downloadFreeBSD-src-a672b2d6691ebb601cf230fd4160bd5051ad108b.zip
FreeBSD-src-a672b2d6691ebb601cf230fd4160bd5051ad108b.tar.gz
Avoid to try to remove suj journal file (.sujournal) and conventional
snapshot directory (.snap) from cleartmp rc.d script.
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/cleartmp3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/rc.d/cleartmp b/etc/rc.d/cleartmp
index 94b7799..0d84987 100755
--- a/etc/rc.d/cleartmp
+++ b/etc/rc.d/cleartmp
@@ -36,7 +36,10 @@ cleartmp_start()
# it can prevent foot-shooting in future.
# + /tmp/lost+found is preserved, but its contents are removed.
# + lost+found and quota.* in subdirectories are removed.
+ # + .sujournal and .snap are preserved.
find -x ${tmp}/. ! -name . \
+ ! \( -name .sujournal -type f -user root \) \
+ ! \( -name .snap -type d -user root \) \
! \( -name lost+found -type d -user root \) \
! \( \( -name quota.user -or -name quota.group \) \
-type f -user root \) \
OpenPOWER on IntegriCloud