svn commit: r194690 - in stable/7/etc: . periodic/daily
Brian Somers
brian at FreeBSD.org
Tue Jun 23 09:51:40 UTC 2009
Author: brian
Date: Tue Jun 23 09:51:38 2009
New Revision: 194690
URL: http://svn.freebsd.org/changeset/base/194690
Log:
MFC: r193302: Avoid using find -delete in favour of find -prune
PR: 122811
Modified:
stable/7/etc/ (props changed)
stable/7/etc/periodic/daily/100.clean-disks
Modified: stable/7/etc/periodic/daily/100.clean-disks
==============================================================================
--- stable/7/etc/periodic/daily/100.clean-disks Tue Jun 23 09:50:50 2009 (r194689)
+++ stable/7/etc/periodic/daily/100.clean-disks Tue Jun 23 09:51:38 2009 (r194690)
@@ -29,7 +29,7 @@ case "$daily_clean_disks_enable" in
echo ""
echo "Cleaning disks:"
set -f noglob
- args="$args -name "`echo "$daily_clean_disks_files" |
+ args="-name "`echo "$daily_clean_disks_files" |
sed -e 's/^[ ]*//' \
-e 's/[ ]*$//' \
-e 's/[ ][ ]*/ -o -name /g'`
@@ -41,9 +41,9 @@ case "$daily_clean_disks_enable" in
print=;;
esac
- rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \
- \( $args \) -atime +$daily_clean_disks_days -delete $print |
- tee /dev/stderr | wc -l)
+ rc=$(find / \( ! -fstype local -o -fstype rdonly \) -prune -o \
+ \( $args \) -atime +$daily_clean_disks_days \
+ -execdir rm -df {} \; $print | tee /dev/stderr | wc -l)
[ -z "$print" ] && rc=0
[ $rc -gt 1 ] && rc=1
set -f glob
More information about the svn-src-stable-7
mailing list