Browse Source

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@.
OPENBSD_4_8
sthen 14 years ago
parent
commit
695eb8273b
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/etc/rc

+ 3
- 2
src/etc/rc View File

@ -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)


Loading…
Cancel
Save