summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2010-07-13 12:28:14 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2010-07-13 12:28:14 +0000
commit201dae194bd824fb232581478c7366170ad773b2 (patch)
tree6893f44d82667870c76e0f72582df1aab6e57dbf
parent439a9e4cff4f679a09620b9192027341cadd74a9 (diff)
When cleaning /tmp at boot, run the slower find unconditionally.
Previously if the quick rm -rf failed, find was not run, so some files were not removed. Looks good to tedu@.
-rw-r--r--etc/rc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index 91ab7c81e9d..09c5d70108f 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.338 2010/06/28 20:16:21 reyk Exp $
+# $OpenBSD: rc,v 1.339 2010/07/13 12:28:13 sthen Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -534,7 +534,8 @@ echo clearing /tmp
# prune quickly with one rm, then use find to clean up /tmp/[lq]*
# (not needed with mfs /tmp, but doesn't hurt there...)
-(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
+(cd /tmp && rm -rf [a-km-pr-zA-Z]*)
+(cd /tmp &&
find . ! -name . ! -name lost+found ! -name quota.user \
! -name quota.group -execdir rm -rf -- {} \; -type d -prune)