From 42c3846e4ffe95f4f218eac94912972ba0795a30 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Tue, 16 Mar 1999 02:47:53 +0000 Subject: [PATCH] run pruning find with -x, to avoid /tmp based mountpoint pruning --- src/etc/daily | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/daily b/src/etc/daily index 9307c4e5..3c3ecbf2 100644 --- a/src/etc/daily +++ b/src/etc/daily @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: daily,v 1.27 1998/11/29 21:35:17 deraadt Exp $ +# $OpenBSD: daily,v 1.28 1999/03/16 02:47:53 deraadt Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin @@ -21,15 +21,15 @@ echo "" echo "Removing scratch and junk files:" if [ -d /tmp -a ! -h /tmp ]; then cd /tmp && { - find . -name 'ssh-*' -prune -o -type f -atime +3 -execdir rm -f -- {} \; - find . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \ + find -x . -name 'ssh-*' -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 . ! -name . ! -type d -atime +7 -execdir rm -f -- {} \; - find . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \ + find -x . ! -name . ! -type d -atime +7 -execdir rm -f -- {} \; + find -x . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \ >/dev/null 2>&1; } fi