diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-06 19:10:00 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-06 19:10:00 +0200 |
commit | 8db1d9365cca524838495a4736513637cd870c99 (patch) | |
tree | be07d4a5f94f749e1d26addec1ffd6fab21eaf07 /bin/schroot-create.sh | |
parent | 659b2aa7cc2bfc42d7a55fe330a05f88c86e7904 (diff) | |
download | jenkins.debian.net-8db1d9365cca524838495a4736513637cd870c99.tar.xz |
refactor: move cleanup_schroot_sessions() to common_functions.sh
Diffstat (limited to 'bin/schroot-create.sh')
-rwxr-xr-x | bin/schroot-create.sh | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 9999ca60..befd694b 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -182,24 +182,6 @@ bootstrap() { fi } -cleanup_schroot_sessions() { - echo - # 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 - 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..." - echo - break - fi - echo "$(date -u) - schroot session cleanup loop $loop" - sleep 15 - done - echo -} - cleanup() { if [ -d $SCHROOT_TARGET ]; then sudo rm -rf --one-file-system $SCHROOT_TARGET || ( echo "Warning: $SCHROOT_TARGET could not be fully removed on forced cleanup." ; ls $SCHROOT_TARGET -la ) |