]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Add a --no-run-if-empty
authorPeter Palfrader <peter@palfrader.org>
Sat, 4 May 2013 11:07:55 +0000 (13:07 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 4 May 2013 11:07:55 +0000 (13:07 +0200)
modules/buildd/files/buildd-schroot-aptitude-kill.squeeze

index 032c5a5c80911a979095b98609bd0035dde0a3c6..46910f1f67746fa10ba688cd6e46b525356b9b02 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 schroots=$(pgrep -x -u 0 schroot -d ',')
-pgrep -x -u 0 -P "$schroots" aptitude | xargs ps h -o 'pid,vsz,cputime' | while read pid vsz cputime; do
+pgrep -x -u 0 -P "$schroots" aptitude | xargs --no-run-if-empty ps h -o 'pid,vsz,cputime' | while read pid vsz cputime; do
   mb=$((vsz/1024))
   [ "$mb" -lt 250 ] && continue
   hours=${vsz%%:*}