diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-03 10:39:01 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-03 10:39:01 +0100 |
commit | 03aeb1ab3bf10a8a7359f479b4340e3f22f227b0 (patch) | |
tree | 6f46152983ff23478d75e2731ecfa43e10038c00 | |
parent | e7bbcffded22067011d9b5f5066b8c2c1e691fc0 (diff) | |
download | jenkins.debian.net-03aeb1ab3bf10a8a7359f479b4340e3f22f227b0.tar.xz |
fix logic
-rwxr-xr-x | bin/cd_tester.sh | 11 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_builds | 2 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_builds_results | 2 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_jobs | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index 1efdd609..0df7f1c5 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -106,8 +106,6 @@ monitor_installation() { vncsnapshot -quiet -allowblank localhost:$DISPLAY snapshot_$(printf "%06d" $NR).jpg 2>/dev/null convert snapshot_$(printf "%06d" $NR).jpg snapshot_$(printf "%06d" $NR).ppm rm snapshot_$(printf "%06d" $NR).jpg - let NR=NR+1 - sleep 2 # give signal we are still running if [ $(($NR % 15)) -eq 0 ] ; then date @@ -119,11 +117,12 @@ monitor_installation() { # if this screenshot is the same as the one 400 screenshots ago, let stop this if [ $(($NR % 100)) -eq 0 ] ; then let OLD=NR-400 - if test $(diff snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm 1>/dev/null) ; then + if diff snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm /dev/null 2>&1 ; then break fi fi - + let NR=NR+1 + sleep 2 done set -x if [ $NR -eq 9000 ] ; then @@ -138,7 +137,7 @@ trap cleanup_all INT TERM EXIT # if [ ! -z $IMAGE ] ; then # only download if $IMAGE is older than a week (60*24*7=10080) (+9500 is a bit less than a week) - if test $(find $IMAGE ! -mmin +9500) || ! test -f $IMAGE ; then + if test $(find $IMAGE -mmin +9500) || ! test -f $IMAGE ; then curl $URL > $IMAGE fi sudo mkdir -p $IMAGE_MNT @@ -150,7 +149,7 @@ else # else netboot gtk # # only download if $KERNEL is older than a week... - if test $(find $KERNEL ! -mmin +9500) || ! test -f $KERNEL ; then + if test $(find $KERNEL -mmin +9500) || ! test -f $KERNEL ; then curl $URL/$KERNEL > $KERNEL curl $URL/$INITRD > $INITRD fi diff --git a/etc/munin/plugins/jenkins_builds b/etc/munin/plugins/jenkins_builds index 450cf4e0..70f3c4ad 100755 --- a/etc/munin/plugins/jenkins_builds +++ b/etc/munin/plugins/jenkins_builds @@ -32,7 +32,7 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) # delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE ! -mmin +$update_interval) ; then +if test $(find $STATEFILE -mmin +$update_interval) ; then rm -f $STATEFILE fi diff --git a/etc/munin/plugins/jenkins_builds_results b/etc/munin/plugins/jenkins_builds_results index 76b64bf0..e7661724 100755 --- a/etc/munin/plugins/jenkins_builds_results +++ b/etc/munin/plugins/jenkins_builds_results @@ -32,7 +32,7 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) # delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE ! -mmin +$update_interval) ; then +if test $(find $STATEFILE -mmin +$update_interval) ; then rm -f $STATEFILE fi diff --git a/etc/munin/plugins/jenkins_jobs b/etc/munin/plugins/jenkins_jobs index 3f3d6e82..d9ddce10 100755 --- a/etc/munin/plugins/jenkins_jobs +++ b/etc/munin/plugins/jenkins_jobs @@ -32,7 +32,7 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) # delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE ! -mmin +$update_interval) ; then +if test $(find $STATEFILE -mmin +$update_interval) ; then rm -f $STATEFILE fi |