summaryrefslogtreecommitdiffstats
path: root/bin/schroot-create.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-05 14:26:58 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-05 14:26:58 +0200
commit76c746024d8ba163e52f0f26e0bf8c20a4d69399 (patch)
treea6e67d4e993dc47891121d300b00a017739f7daf /bin/schroot-create.sh
parentf138af6494ab94ad1417a39976948287c1a4155c (diff)
downloadjenkins.debian.net-76c746024d8ba163e52f0f26e0bf8c20a4d69399.tar.xz
reproducible: replace 'ps fax|grep -v grep|grep foo' with 'pgrep -f foo'
Diffstat (limited to 'bin/schroot-create.sh')
-rwxr-xr-xbin/schroot-create.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index aff86ecb..9999ca60 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -187,7 +187,7 @@ cleanup_schroot_sessions() {
# FIXME: if this works well, move to _common.sh and use the same function from _maintenance.sh
local RESULT=""
for loop in $(seq 0 40) ; do
- ps fax|grep -v grep | grep -v schroot-create.sh |grep "schroot --directory" || for i in $(schroot --all-sessions -l ) ; do ps fax|grep -v grep |grep -v schroot-create.sh | grep "schroot --directory" || schroot -e -c $i ; done
+ pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l ) ; do pgrep -f "schroot --directory" || schroot -e -c $i ; done
RESULT=$(schroot --all-sessions -l)
if [ -z "$RESULT" ] ; then
echo "No schroot sessions in use atm..."