Prechádzať zdrojové kódy

Use find|xargs rather than find -exec in cron.daily

Matt Zimmerman 21 rokov pred
rodič
commit
60ea46b255
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      debian/apt.cron.daily

+ 1 - 1
debian/apt.cron.daily

@@ -59,7 +59,7 @@ check_size_constraints()
 
 
     # check age
     # check age
     if [ ! $MaxAge -eq 0 ]; then
     if [ ! $MaxAge -eq 0 ]; then
-	find $Cache -name "*.deb"  -mtime +$MaxAge -exec rm -f {} \;
+	find $Cache -name "*.deb"  -mtime +$MaxAge -print0 | xargs -r -0 rm -f
     fi
     fi
     
     
     # check size
     # check size