summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-11-05 17:08:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-11-05 17:08:00 +0000
commitfdb582d9c5c3a3207f38b410f90b342b62e67091 (patch)
treed81525ab135befc2c024de171b23f9233743fed0 /etc
parentbcdf5c2efe76d9f4aa2866937338df4094947a85 (diff)
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@
Diffstat (limited to 'etc')
-rw-r--r--etc/rc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index ac70196d3b6..aa6aa039a4d 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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
# or after single-user.
@@ -442,8 +442,8 @@ echo clearing /tmp
# (not needed with mfs /tmp, but doesn't hurt there...)
(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)
+ find . -maxdepth 1 ! -name . ! -name lost+found ! -name quota.user \
+ ! -name quota.group -execdir rm -rf -- {} \;)
setup_X_sockets