Historic archive of defunct list bismark-commits@lists.bufferbloat.net
 help / color / mirror / Atom feed
* [Bismark-commits] rev 353 - trunk/server/scripts
@ 2011-05-27 10:17 walter
  0 siblings, 0 replies; only message in thread
From: walter @ 2011-05-27 10:17 UTC (permalink / raw)
  To: bismark-commits

Author: walter
Date: 2011-05-27 12:17:36 +0200 (Fri, 27 May 2011)
New Revision: 353

Modified:
   trunk/server/scripts/bdm
Log:
aggregated notification fix

Modified: trunk/server/scripts/bdm
===================================================================
--- trunk/server/scripts/bdm	2011-05-27 06:05:25 UTC (rev 352)
+++ trunk/server/scripts/bdm	2011-05-27 10:17:36 UTC (rev 353)
@@ -343,12 +343,20 @@
 # $2 = message
 function sendmail ()
 {
-	[ ${2:0:1} == "@" ] && msg=$(cat ${2:1}) || msg=$2
+	# Expand @filename if present
+	if [ ${1:0:1} == "@" ]; then
+		msg=$(cat ${1:1})
+		id=$(basename $1)
+	else
+		msg=$2
+		id=$1
+	fi
 
+	# Send email to admins
 	/usr/sbin/sendmail -t <<-end
 		From: "Bismark Device Manager" <do-not-reply@gtnoise.net>
 		To: "Walter" <walter.dedonato@unina.it>, "Brian" <bpoole@cc.gatech.edu>, "Srikanth" <srikanth@gatech.edu>
-		Subject: Bismark Notification System ($1)
+		Subject: Bismark Notification System ($id)
 		Date: $(date -R)
 		Content-type: text/plain
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-27 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 10:17 [Bismark-commits] rev 353 - trunk/server/scripts walter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox