[Piuparts-commits] [piuparts] 01/01: slave_stop: various improvements

Holger Levsen holger at layer-acht.org
Sun Mar 5 23:48:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 9fd7398cf91fb51358a4b12f510c58c2b770a430
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Mar 6 00:48:36 2017 +0100

    slave_stop: various improvements
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 slave-bin/slave_stop.in | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/slave-bin/slave_stop.in b/slave-bin/slave_stop.in
index 8b8d91d..2bf3e13 100755
--- a/slave-bin/slave_stop.in
+++ b/slave-bin/slave_stop.in
@@ -24,15 +24,18 @@ set -e
 . @sharedir@/piuparts/lib/read_config.sh
 
 get_config_value SLAVEROOT global slave-directory
+get_config_value SLAVECOUNT global slave-count 1
 
-
-( sleep 2 && pkill --signal INT --full '/usr/bin/python /srv/piuparts.debian.org/share/piuparts/piuparts-slave' ) &
+( sleep 1 && pkill --signal INT --full '/usr/bin/python /srv/piuparts.debian.org/share/piuparts/piuparts-slave' ) &
 cd $SLAVEROOT
-tail -f screenlog.? &
+for i in $(seq 1 $SLAVECOUNT) ; do
+	tail -f screenlog.$i &
+done
 
-while pgrep --full '/usr/bin/python /srv/piuparts.debian.org/share/piuparts/piuparts-slave' ; do
+while ( pgrep --full '/usr/bin/python /srv/piuparts.debian.org/share/piuparts/piuparts-slave' | xargs echo "slaves running: " ) ; do
 	sleep 1
 done
 
-pkill --full 'tail -f slave/screenlog.?'
+pkill --full 'tail -f slave/screenlog.'
 
+echo "All slaves have stop running now."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list