diff options
author | Holger Levsen <holger@layer-acht.org> | 2013-01-11 15:44:59 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2013-01-11 15:44:59 +0100 |
commit | 09992e92e56cc9047eb7ffa4426dcd976adb8f88 (patch) | |
tree | 4a21ea7c35df283db77865a937af4f8951697cfe /bin | |
parent | 11a8b8d234d2d17f86a4db83e32c08e867334cea (diff) | |
download | jenkins.debian.net-09992e92e56cc9047eb7ffa4426dcd976adb8f88.tar.xz |
wait until there is no such process running
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/housekeeping.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 5bce9dfa..b03e16e0 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -58,6 +58,14 @@ report_squid_usage() { fi } +wait4idle() { + echo "Waiting until no $1.sh process runs.... $(date)" + while [ $(ps fax | grep -c $1.sh) -gt 1 ] ; do + sleep 30 + done + echo "Done waiting: $(date)" +} + general_housekeeping() { echo uptime @@ -89,10 +97,12 @@ if [ -z $1 ] ; then report_squid_usage brief else case $1 in - chroot-installation) report_disk_usage $1 + chroot-installation) wait4idle $1 + report_disk_usage $1 check_for_mounted_chroots $1 ;; - g-i-installation) report_disk_usage $1 + g-i-installation) wait4idle $1 + report_disk_usage $1 report_filetype_usage $1 raw warn report_filetype_usage $1 iso report_filetype_usage $1 png |