summaryrefslogtreecommitdiffstats
path: root/bin/common-functions.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-17 17:13:24 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-17 17:13:24 +0200
commit6de8b04c1d0d77e0f5054a079452d4031fe686c4 (patch)
tree6ec118dbdb3ed9412df3c61f0cc99658854044aa /bin/common-functions.sh
parent1388c723cab847fced6a6b51291e93d3b478b9a4 (diff)
downloadjenkins.debian.net-6de8b04c1d0d77e0f5054a079452d4031fe686c4.tar.xz
reproducible arch: ignore arch schroot sessions in maintenance
Diffstat (limited to 'bin/common-functions.sh')
-rwxr-xr-xbin/common-functions.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 163833ee..aa765272 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -136,11 +136,15 @@ cleanup_schroot_sessions() {
local RESULT=""
for loop in $(seq 0 40) ; do
# first, check if no process using "schroot" is running, if thats the case, loop through all schroot sessions:
- pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l ) ; do
+ # arch sessions are ignored, because they are handled properly
+ pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:arch") ; do
# then, check that schroot is still not run, and then delete the session
+ if [ -z $i ] ; then
+ continue
+ fi
pgrep -f "schroot --directory" || schroot -e -c $i
done
- RESULT=$(schroot --all-sessions -l)
+ RESULT=$(schroot --all-sessions -l|grep -v "session:arch")
if [ -z "$RESULT" ] ; then
echo "No schroot sessions in use atm..."
echo