Explorar o código

* supress output when /var/cache/apt/archives is empty; break when min-age is reached

Michael Vogt %!s(int64=21) %!d(string=hai) anos
pai
achega
3408b58cbf
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      debian/apt.cron.daily

+ 2 - 2
debian/apt.cron.daily

@@ -110,7 +110,7 @@ check_size_constraints()
 	MinAge=$(($MinAge*24*60*60))
 
 	# reverse-sort by mtime
-	for file in $(ls -rt $Cache/*.deb); do 
+	for file in $(ls -rt $Cache/*.deb 2>/dev/null); do 
 	    du=$(du -s $Cache)
 	    size=${du%%/*}
 	    # check if the cache is small enough
@@ -125,7 +125,7 @@ check_size_constraints()
 		#echo "$file ($delta), $MinAge"
 		if [ $delta -le $MinAge ]; then
 		    #echo "Skiping $file (delta=$delta)"
-		    continue
+		    break
 		fi
 	    fi