Commit 250fb748 authored by Holger Levsen's avatar Holger Levsen

reproducible Arch Linux: update regex to ignore Arch Linux schroot sessions

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 541109de
...@@ -231,14 +231,14 @@ cleanup_schroot_sessions() { ...@@ -231,14 +231,14 @@ cleanup_schroot_sessions() {
for loop in $(seq 0 40) ; do 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: # first, check if no process using "schroot" is running, if thats the case, loop through all schroot sessions:
# arch sessions are ignored, because they are handled properly # arch sessions are ignored, because they are handled properly
pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:jenkins-reproducible-archlinux"||true) ; do pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:archlinux"||true) ; do
# then, check that schroot is still not run, and then delete the session # then, check that schroot is still not run, and then delete the session
if [ -z $i ] ; then if [ -z $i ] ; then
continue continue
fi fi
pgrep -f "schroot --directory" || schroot -e -c $i pgrep -f "schroot --directory" || schroot -e -c $i
done done
RESULT=$(schroot --all-sessions -l|grep -v "session:jenkins-reproducible-archlinux"||true) RESULT=$(schroot --all-sessions -l|grep -v "session:archlinux"||true)
if [ -z "$RESULT" ] ; then if [ -z "$RESULT" ] ; then
echo "No schroot sessions in use atm..." echo "No schroot sessions in use atm..."
echo echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment