summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-04-29 18:45:59 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-04-29 18:45:59 +0000
commit4226ac75cf3f8aa8a0a249908d9f1767c4265ba0 (patch)
treee390c5a392646a59bdd61471a917e3875f575b19 /etc
parent217330626d04348c63d380559e07fe45b3fd7c50 (diff)
Prune /tmp traversal at .X11-unix
Since /tmp might be a link to /var/tmp, prune at ssh-* or .X11-unix like the find on /tmp does.
Diffstat (limited to 'etc')
-rw-r--r--etc/daily8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/daily b/etc/daily
index 527fb7b5195..324b8d09ae7 100644
--- a/etc/daily
+++ b/etc/daily
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: daily,v 1.30 2000/04/28 00:47:55 itojun Exp $
+# $OpenBSD: daily,v 1.31 2000/04/29 18:45:58 millert Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
@@ -21,14 +21,16 @@ echo ""
echo "Removing scratch and junk files:"
if [ -d /tmp -a ! -h /tmp ]; then
cd /tmp && {
- find -x . -name 'ssh-*' -prune -o -type f -atime +3 -execdir rm -f -- {} \;
+ find -x . \( -name 'ssh-*' -o -name '.X11-unix' \) -prune -o \
+ -type f -atime +3 -execdir rm -f -- {} \;
find -x . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \
>/dev/null 2>&1; }
fi
if [ -d /var/tmp -a ! -h /var/tmp ]; then
cd /var/tmp && {
- find -x . ! -name . ! -type d -atime +7 -execdir rm -f -- {} \;
+ find -x . \( -name 'ssh-*' -o -name '.X11-unix' \) -prune -o \
+ ! -type d -atime +7 -execdir rm -f -- {} \;
find -x . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \
>/dev/null 2>&1; }
fi