summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-09-09 17:03:58 +0000
committerbdrewery <bdrewery@FreeBSD.org>2014-09-09 17:03:58 +0000
commitec56ad408f8f497ee4f4cdd640b5b8c10493cad7 (patch)
tree0512223c10bdc6fbf23a85ec223313213687b0f1 /etc/periodic/daily
parentb7774f528d7e78c3d2effd31fdfdffacf0089492 (diff)
downloadFreeBSD-src-ec56ad408f8f497ee4f4cdd640b5b8c10493cad7.zip
FreeBSD-src-ec56ad408f8f497ee4f4cdd640b5b8c10493cad7.tar.gz
Don't cross mount boundaries when cleaning tmp files.
Mounting something in /tmp such as a build jail with nullfs mounts for some directories can result in very surprising results the next day. MFC after: 2 weeks Relnotes: yes
Diffstat (limited to 'etc/periodic/daily')
-rwxr-xr-xetc/periodic/daily/110.clean-tmps4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/periodic/daily/110.clean-tmps b/etc/periodic/daily/110.clean-tmps
index eef3bc6..67bcec6 100755
--- a/etc/periodic/daily/110.clean-tmps
+++ b/etc/periodic/daily/110.clean-tmps
@@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in
rc=$(for dir in $daily_clean_tmps_dirs
do
[ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && {
- find -d . -type f $args -delete $print
- find -d . ! -name . -type d $dargs -delete $print
+ find -x -d . -type f $args -delete $print
+ find -x -d . ! -name . -type d $dargs -delete $print
} | sed "s,^\\., $dir,"
done | tee /dev/stderr | wc -l)
[ -z "$print" ] && rc=0
OpenPOWER on IntegriCloud