[Popcon-commits] cvs commit to popularity-contest/debian by pere

popcon-commits at lists.alioth.debian.org popcon-commits@lists.alioth.debian.org
Mon Jul 4 17:01:38 UTC 2005


Update of /cvsroot/popcon/popularity-contest/debian
In directory haydn:/tmp/cvs-serv26423

Modified Files:
	cron.weekly 
Log Message:
Do not include mail headers when submitting using HTTP.


Index: cron.weekly
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/debian/cron.weekly,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cron.weekly	4 Jul 2005 15:23:50 -0000	1.6
+++ cron.weekly	4 Jul 2005 17:01:36 -0000	1.7
@@ -30,13 +30,6 @@
 
 run_popcon()
 {
-	if [ -n "$MAILFROM" ]; then
-		echo "From: <$MAILFROM>"
-		echo "Sender: <$MAILFROM>"
-	fi
-	echo "To: $MAILTO"
-	echo "Subject: popularity-contest submission"
-	echo
 	# Set HOME to avoid bug #212013.
 	HOME=/tmp su nobody -pc "sh -c /usr/sbin/popularity-contest"
 }
@@ -57,7 +50,16 @@
 # try to email the popularity contest data
 
 if [ -x "`which sendmail 2>/dev/null`" ]; then
-	do_sendmail < $POPCON
+    (
+	if [ -n "$MAILFROM" ]; then
+		echo "From: <$MAILFROM>"
+		echo "Sender: <$MAILFROM>"
+	fi
+	echo "To: $MAILTO"
+	echo "Subject: popularity-contest submission"
+	echo
+	cat $POPCON
+    ) | do_sendmail
 else
 	logger -t popcon "Unable to submit popcon report using sendmail."
 fi





More information about the Popcon-commits mailing list