5 # Perform temporary directory cleaning so that long-lived systems
6 # don't end up with excessively old files there.
9 # If there is a global system configuration file, suck it in.
11 if [ -r /etc/defaults/periodic.conf ]
13 . /etc/defaults/periodic.conf
17 case "$daily_clean_tmps_enable" in
19 if [ -n "$daily_clean_tmps_days" ]
22 echo "Removing old temporary files:"
25 args="-atime +$daily_clean_tmps_days -mtime +$daily_clean_tmps_days"
26 [ -n "$daily_clean_tmps_ignore" ] &&
27 args="$args "`echo " ${daily_clean_tmps_ignore% }" |
28 sed 's/[ ][ ]*/ ! -name /g'`
29 case "$daily_clean_tmps_verbose" in
36 for dir in $daily_clean_tmps_dirs
38 [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && {
39 find -d . -type f $args -delete $print
40 find -d . ! -name . -type d -mtime +$daily_clean_tmps_days \
42 } | sed "s,^\\., $dir,"