Browse Source

When clearing /tmp, use "-maxdepth -1" instead of "-type d -prune".

This is easier to understand and fixes a bug where the "-type d -prune"
was misplaced as noticed by pirofti@.  OK deraadt@
OPENBSD_5_7
millert 10 years ago
parent
commit
2f61038186
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/etc/rc

+ 3
- 3
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.442 2014/09/15 22:28:58 matthieu Exp $
# $OpenBSD: rc,v 1.443 2014/11/05 17:07:59 millert Exp $
# System startup script run by init on autoboot # System startup script run by init on autoboot
# or after single-user. # or after single-user.
@ -442,8 +442,8 @@ echo clearing /tmp
# (not needed with mfs /tmp, but doesn't hurt there...) # (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 && (cd /tmp &&
find . ! -name . ! -name lost+found ! -name quota.user \
! -name quota.group -execdir rm -rf -- {} \; -type d -prune)
find . -maxdepth 1 ! -name . ! -name lost+found ! -name quota.user \
! -name quota.group -execdir rm -rf -- {} \;)
setup_X_sockets setup_X_sockets


Loading…
Cancel
Save