projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
only notify service if defined
[mirror/dsa-puppet.git]
/
modules
/
buildd
/
files
/
buildd-schroot-aptitude-kill.squeeze
diff --git
a/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze
b/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze
index
032c5a5
..
0be841f
100644
(file)
--- a/
modules/buildd/files/buildd-schroot-aptitude-kill.squeeze
+++ b/
modules/buildd/files/buildd-schroot-aptitude-kill.squeeze
@@
-1,7
+1,7
@@
#!/bin/bash
schroots=$(pgrep -x -u 0 schroot -d ',')
#!/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%%:*}
mb=$((vsz/1024))
[ "$mb" -lt 250 ] && continue
hours=${vsz%%:*}
@@
-9,6
+9,6
@@
pgrep -x -u 0 -P "$schroots" aptitude | xargs ps h -o 'pid,vsz,cputime' | while
mins=${nohours%:*}
if [ "$hours" -gt 0 ] || [ "$mins" -gt 15 ]; then
mins=${nohours%:*}
if [ "$hours" -gt 0 ] || [ "$mins" -gt 15 ]; then
- kill
$pid
+ kill
"$pid"
fi
done
fi
done