[Piuparts-commits] rev 452 - in piatti/home: piupartsm/bin piupartss/bin

Holger Levsen holger at alioth.debian.org
Sat Aug 1 11:35:07 UTC 2009


Author: holger
Date: 2009-08-01 11:35:06 +0000 (Sat, 01 Aug 2009)
New Revision: 452

Modified:
   piatti/home/piupartsm/bin/detect_slave_problems
   piatti/home/piupartss/bin/slave_run
Log:
dont warn (wrongly) about a problem if piuparts-slave has been restarted

Modified: piatti/home/piupartsm/bin/detect_slave_problems
===================================================================
--- piatti/home/piupartsm/bin/detect_slave_problems	2009-07-25 15:43:50 UTC (rev 451)
+++ piatti/home/piupartsm/bin/detect_slave_problems	2009-08-01 11:35:06 UTC (rev 452)
@@ -52,18 +52,20 @@
 mv screenlog.new screenlog.old || cp $SCREENLOG screenlog.old
 cp $SCREENLOG screenlog.new
 
-diff screenlog.old screenlog.new >/dev/null 2>&1 && {
-	if [ ! -f $LOCKFILE ] ; then
-		{
-			echo "Either piuparts-slave hangs or is not running at all or wasn't started with ~piupartss/bin/slave_run - please investigate and take appropriate measures!"
-			echo
-			tail screenlog.new 
-		} | mail -s "problem with piuparts-slave detected" piupartsm
-		touch $LOCKFILE
-		chmod 660 $LOCKFILE
-	fi
-}
-
+# dont complain if just started
+if [ -f screenlog.old ] && [ ! -s screenlog.old ] ; then
+	diff screenlog.old screenlog.new >/dev/null 2>&1 && {
+		if [ ! -f $LOCKFILE ] ; then
+			{
+				echo "Either piuparts-slave hangs or is not running at all or wasn't started with ~piupartss/bin/slave_run - please investigate and take appropriate measures!"
+				echo
+				tail screenlog.new 
+			} | mail -s "problem with piuparts-slave detected" piupartsm
+			touch $LOCKFILE
+			chmod 660 $LOCKFILE
+		fi
+	}
+fi
 #
 # send screenlog daily no matter what, but only once a day :)
 #

Modified: piatti/home/piupartss/bin/slave_run
===================================================================
--- piatti/home/piupartss/bin/slave_run	2009-07-25 15:43:50 UTC (rev 451)
+++ piatti/home/piupartss/bin/slave_run	2009-08-01 11:35:06 UTC (rev 452)
@@ -31,5 +31,6 @@
 
 screen -L -d -m -S piuparts-slave-screen su - piupartss -c "cd /org/piuparts.debian.org/slave && python ../share/piuparts/piuparts-slave"
 
-cp $SCREENLOG $MONITORDIR/screenlog.new
+rm $MONITORDIR/screenlog.new
+touch $MONITORDIR/screenlog.new
 chmod 775 $MONITORDIR/screenlog.new




More information about the Piuparts-commits mailing list