Commit adefb79a authored by Leigh B. Stoller's avatar Leigh B. Stoller

A set of rather tedious and trivial changes to localize the subject

line in all email from the system. Remove all of the TESTBED: tags
and modify the email function in the web server and perl library to
prepend @DOMAIN@: to the message.
parent 5db6c935
...@@ -1149,7 +1149,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -1149,7 +1149,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webnodecontrol tbsetup/node_control \ tbsetup/webnodecontrol tbsetup/node_control \
tbsetup/webmkgroup tbsetup/mkgroup \ tbsetup/webmkgroup tbsetup/mkgroup \
tbsetup/webmkacct tbsetup/mkacct \ tbsetup/webmkacct tbsetup/mkacct \
tbsetup/webmkproj tbsetup/mkproj \ tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tip/GNUmakefile \ tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \ tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/netbsd/GNUmakefile \ tmcd/netbsd/GNUmakefile \
......
...@@ -234,7 +234,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -234,7 +234,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webnodecontrol tbsetup/node_control \ tbsetup/webnodecontrol tbsetup/node_control \
tbsetup/webmkgroup tbsetup/mkgroup \ tbsetup/webmkgroup tbsetup/mkgroup \
tbsetup/webmkacct tbsetup/mkacct \ tbsetup/webmkacct tbsetup/mkacct \
tbsetup/webmkproj tbsetup/mkproj \ tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tip/GNUmakefile \ tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \ tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/netbsd/GNUmakefile \ tmcd/netbsd/GNUmakefile \
......
...@@ -131,7 +131,7 @@ if (-e "$basename" && system("gzip -9 $basename")) { ...@@ -131,7 +131,7 @@ if (-e "$basename" && system("gzip -9 $basename")) {
fatal("gzip $basename failed!"); fatal("gzip $basename failed!");
} }
#system("cat $logname | /usr/bin/mail -s '\"DB Backup Finished\"' stoller"); #SENDMAIL("stoller", "DB Backup Finished", "", undef, undef, ($logname));
unlink("$logname"); unlink("$logname");
exit 0; exit 0;
...@@ -139,9 +139,8 @@ sub fatal($) { ...@@ -139,9 +139,8 @@ sub fatal($) {
my ($msg) = @_; my ($msg) = @_;
print STDERR "$msg\n"; print STDERR "$msg\n";
system("cat $logname | /usr/bin/mail ". SENDMAIL($TBOPS, "DB Backup Failed", $msg, undef, undef, ($logname));
"-s '\"DB Backup Failed\"' \"$TBOPS\"");
unlink("$logname"); unlink("$logname");
exit(1); exit(1);
} }
...@@ -67,7 +67,7 @@ DBQueryFatal("update images set load_address=''"); ...@@ -67,7 +67,7 @@ DBQueryFatal("update images set load_address=''");
# #
DBQueryFatal("delete from login"); DBQueryFatal("delete from login");
system("cat $logname | /usr/bin/mail -s '\"DB Boot Finished\"' stoller"); #SENDMAIL("stoller", "DB Boot Finished", "", undef, undef, ($logname));
unlink("$logname"); unlink("$logname");
exit 0; exit 0;
...@@ -75,9 +75,7 @@ sub fatal($) { ...@@ -75,9 +75,7 @@ sub fatal($) {
my ($msg) = @_; my ($msg) = @_;
print STDERR "$msg\n"; print STDERR "$msg\n";
SENDMAIL($TBOPS, "DB Boot Failed", $msg, undef, undef, ($logname));
system("cat $logname | /usr/bin/mail ".
"-s '\"DB Boot Failed\"' \"$TBOPS\"");
unlink("$logname"); unlink("$logname");
exit(1); exit(1);
} }
...@@ -140,6 +140,6 @@ exit 0; ...@@ -140,6 +140,6 @@ exit 0;
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: Failure Generating Email Lists", $msg); SENDMAIL($TBOPS, "Failure Generating Email Lists", $msg);
die($msg); die($msg);
} }
...@@ -42,6 +42,10 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ...@@ -42,6 +42,10 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# #
$| = 1; $| = 1;
# Load the Testbed support stuff.
use lib "@prefix@/lib";
use libtestbed;
if (@ARGV != 1 || ($ARGV[0] ne "-all" && $ARGV[0] ne "-active")) { if (@ARGV != 1 || ($ARGV[0] ne "-all" && $ARGV[0] ne "-active")) {
usage(); usage();
} }
...@@ -74,8 +78,7 @@ exit(0); ...@@ -74,8 +78,7 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
system("echo \"$msg\" | /usr/bin/mail ". SENDMAIL($TBOPS, "genelists.proxy failure", $msg);
"-s 'TESTBED: Named Setup Failed' $TBOPS");
die($msg); die($msg);
} }
...@@ -1375,10 +1375,9 @@ sub DBWarn($) ...@@ -1375,10 +1375,9 @@ sub DBWarn($)
$text = "$message - In $progname\n" . $text = "$message - In $progname\n" .
"$DBErrorString\n"; "$DBErrorString\n";
print STDERR "*** $text\n"; print STDERR "*** $text";
system("echo \"$text\" | /usr/bin/mail ". libtestbed::SENDMAIL($TBOPS, "DBError - $message", $text);
"-s 'TESTBED: DBError - $message' \"$TBOPS\"");
} }
# #
......
...@@ -83,7 +83,7 @@ while (1) { ...@@ -83,7 +83,7 @@ while (1) {
print "Exited with status $exit_status at " . TBTimeStamp() . "\n"; print "Exited with status $exit_status at " . TBTimeStamp() . "\n";
SENDMAIL($TBOPS, "TESTBED: Genlastlog Failed!", SENDMAIL($TBOPS, "Genlastlog Failed!",
"Failed with exit value $exit_status.\n". "Failed with exit value $exit_status.\n".
"Please look at the syslog entries for genlastlog!"); "Please look at the syslog entries for genlastlog!");
} }
......
...@@ -99,7 +99,8 @@ post-install: ...@@ -99,7 +99,8 @@ post-install:
# Control node installation (okay, plastic) # Control node installation (okay, plastic)
# #
control-install: $(addprefix $(INSTALL_SBINDIR)/, console_setup.proxy) \ control-install: $(addprefix $(INSTALL_SBINDIR)/, console_setup.proxy) \
$(addprefix $(INSTALL_SBINDIR)/, exports_setup.proxy) $(addprefix $(INSTALL_SBINDIR)/, exports_setup.proxy) \
$(addprefix $(INSTALL_LIBDIR)/, libtestbed.pm)
cd $(INSTALL_BINDIR) && \ cd $(INSTALL_BINDIR) && \
list='$(USERBINS)'; for file in $$list; do \ list='$(USERBINS)'; for file in $$list; do \
rm -f $$file; \ rm -f $$file; \
......
...@@ -594,7 +594,7 @@ sub donotify($$$) ...@@ -594,7 +594,7 @@ sub donotify($$$)
print STDOUT "$mesg"; print STDOUT "$mesg";
$subject = "TESTBED: Batch Mode Experiment $subtext $pid/$eid"; $subject = "Batch Mode Experiment $subtext $pid/$eid";
$from = $TBOPS; $from = $TBOPS;
$hdrs = "Reply-To: $TBOPS"; $hdrs = "Reply-To: $TBOPS";
......
...@@ -317,7 +317,7 @@ my $message = ...@@ -317,7 +317,7 @@ my $message =
"in your message to $TBOPS\n"; "in your message to $TBOPS\n";
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Experiment $pid/$eid Terminated", "Experiment $pid/$eid Terminated",
$message, $message,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $expt_head_name <$expt_head_email>\n". "Cc: $expt_head_name <$expt_head_email>\n".
...@@ -352,7 +352,7 @@ sub fatal($) ...@@ -352,7 +352,7 @@ sub fatal($)
# Send a message to the testbed list. Append the logfile. # Send a message to the testbed list. Append the logfile.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Termination Failure: $pid/$eid", "Termination Failure: $pid/$eid",
$mesg, $mesg,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $expt_head_name <$expt_head_email>\n". "Cc: $expt_head_name <$expt_head_email>\n".
......
...@@ -226,7 +226,7 @@ exit(0); ...@@ -226,7 +226,7 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: Exports Setup Failed", $msg); SENDMAIL($TBOPS, "Exports Setup Failed", $msg);
die($msg); die($msg);
} }
......
...@@ -37,6 +37,12 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ...@@ -37,6 +37,12 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
$| = 1; #Turn off line buffering on output $| = 1; #Turn off line buffering on output
#
# Testbed Support libraries
#
use lib "@prefix@/lib";
use libtestbed;
# #
# Take our input and write it to the tail file. # Take our input and write it to the tail file.
# #
...@@ -110,8 +116,7 @@ exit(0); ...@@ -110,8 +116,7 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
system("echo \"$msg\" | /usr/bin/mail ". SENDMAIL($TBOPS, "Exports Setup Failed", $msg);
"-s 'TESTBED: Named Setup Failed' $TBOPS");
die($msg); die($msg);
} }
...@@ -37,6 +37,12 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ...@@ -37,6 +37,12 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
$| = 1; #Turn off line buffering on output $| = 1; #Turn off line buffering on output
#
# Testbed Support libraries
#
use lib "@prefix@/lib";
use libtestbed;
# #
# Take our input and write it to the tail file. # Take our input and write it to the tail file.
# #
...@@ -110,8 +116,7 @@ exit(0); ...@@ -110,8 +116,7 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
system("echo \"$msg\" | /usr/bin/mail ". SENDMAIL($TBOPS, "Exports Setup Failed", $msg);
"-s 'TESTBED: Named Setup Failed' $TBOPS");
die($msg); die($msg);
} }
...@@ -115,7 +115,7 @@ while (1) { ...@@ -115,7 +115,7 @@ while (1) {
waitpid($child_pid, 0); waitpid($child_pid, 0);
if ($?) { if ($?) {
SENDMAIL($TBOPS, "TESTBED: Frisbeed Failed!", SENDMAIL($TBOPS, "Frisbeed Failed!",
"Imageid: $imageid\n". "Imageid: $imageid\n".
"Address: $address\n\n". "Address: $address\n\n".
"Process $child_pid exited with value $?.\n". "Process $child_pid exited with value $?.\n".
......
...@@ -10,6 +10,8 @@ use Exporter; ...@@ -10,6 +10,8 @@ use Exporter;
qw ( SENDMAIL OPENMAIL TBTimeStamp TBBackGround TBDateTimeFSSafe qw ( SENDMAIL OPENMAIL TBTimeStamp TBBackGround TBDateTimeFSSafe
TBMakeLogname ); TBMakeLogname );
my $MAILTAG = "@OURDOMAIN@";
# A library of useful stuff. # A library of useful stuff.
# Send an email message via sendmail -t. # Send an email message via sendmail -t.
...@@ -23,6 +25,7 @@ use Exporter; ...@@ -23,6 +25,7 @@ use Exporter;
sub SENDMAIL($$$;$$@) sub SENDMAIL($$$;$$@)
{ {
my($To, $Subject, $Message, $From, $Headers, @Files) = @_; my($To, $Subject, $Message, $From, $Headers, @Files) = @_;
my $tag = uc($MAILTAG);
if (! open(MAIL, "|/usr/sbin/sendmail -t")) { if (! open(MAIL, "|/usr/sbin/sendmail -t")) {
print STDERR "SENDMAIL: Could not start sendmail: $!\n"; print STDERR "SENDMAIL: Could not start sendmail: $!\n";
...@@ -36,7 +39,7 @@ sub SENDMAIL($$$;$$@) ...@@ -36,7 +39,7 @@ sub SENDMAIL($$$;$$@)
print MAIL "From: $From\n"; print MAIL "From: $From\n";
} }
print MAIL "To: $To\n"; print MAIL "To: $To\n";
print MAIL "Subject: $Subject\n"; print MAIL "Subject: $tag: $Subject\n";
if (defined($Headers)) { if (defined($Headers)) {
print MAIL "$Headers\n"; print MAIL "$Headers\n";
} }
...@@ -88,7 +91,7 @@ sub OPENMAIL($$;$$) ...@@ -88,7 +91,7 @@ sub OPENMAIL($$;$$)
print MAIL "From: $From\n"; print MAIL "From: $From\n";
} }
print MAIL "To: $To\n"; print MAIL "To: $To\n";
print MAIL "Subject: $Subject\n"; print MAIL "Subject: $tag: $Subject\n";
if (defined($Headers)) { if (defined($Headers)) {
print MAIL "$Headers\n"; print MAIL "$Headers\n";
} }
......
...@@ -281,6 +281,6 @@ exit(0); ...@@ -281,6 +281,6 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: mkacct-ctrl Failed", $msg); SENDMAIL($TBOPS, "mkacct Failed", $msg);
die("$0: $msg\n"); die("$0: $msg\n");
} }
...@@ -326,7 +326,7 @@ sub donotify($$) ...@@ -326,7 +326,7 @@ sub donotify($$)
} }
SENDMAIL($to, SENDMAIL($to,
"TESTBED: Group Creation " . $subtext . ": $pid/$gid", "Group Creation " . $subtext . ": $pid/$gid",
$mesg, $from, $hdrs, $mesg, $from, $hdrs,
($logname)); ($logname));
} }
......
...@@ -195,6 +195,6 @@ exit(0); ...@@ -195,6 +195,6 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: mkproj $pid Failed", $msg); SENDMAIL($TBOPS, "mkproj $pid Failed", $msg);
die("$0: $msg\n"); die("$0: $msg\n");
} }
...@@ -159,6 +159,6 @@ exit(0); ...@@ -159,6 +159,6 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: Named Setup Failed", $msg); SENDMAIL($TBOPS, "Named Setup Failed", $msg);
die($msg); die($msg);
} }
...@@ -279,10 +279,10 @@ sub NotifyUser($$) ...@@ -279,10 +279,10 @@ sub NotifyUser($$)
} }
if ($iserr) { if ($iserr) {
$subject = "TESTBED: Node Update Failed $pid/$eid"; $subject = "Node Update Failed $pid/$eid";
} }
else { else {
$subject = "TESTBED: Node Update Success $pid/$eid"; $subject = "Node Update Success $pid/$eid";
} }
$from = $TBOPS; $from = $TBOPS;
$hdrs = "Reply-To: $TBOPS"; $hdrs = "Reply-To: $TBOPS";
......
...@@ -410,7 +410,7 @@ foreach my $node ( @nodes ) { ...@@ -410,7 +410,7 @@ foreach my $node ( @nodes ) {
# Send mail to testbed-ops and to the user about it. # Send mail to testbed-ops and to the user about it.
my ($user) = getpwuid($UID); my ($user) = getpwuid($UID);
SENDMAIL($user, "TESTBED: Node $node is down", SENDMAIL($user, "Node $node is down",
"Node $node in pid/eid $pid/$eid appears to be dead.\n\n". "Node $node in pid/eid $pid/$eid appears to be dead.\n\n".
"Your experiment will continue to run since this failure\n". "Your experiment will continue to run since this failure\n".
"is nonfatal, although you might encounter other problems\n". "is nonfatal, although you might encounter other problems\n".
...@@ -431,7 +431,7 @@ foreach my $node ( @nodes ) { ...@@ -431,7 +431,7 @@ foreach my $node ( @nodes ) {
MarkNodeDown($node); MarkNodeDown($node);
# Send mail to testbed-ops about it # Send mail to testbed-ops about it
SENDMAIL($TBOPS, "TESTBED: Node $node is down", SENDMAIL($TBOPS, "Node $node is down",
"Node $node in pid/eid $pid/$eid appears to be dead.\n\n". "Node $node in pid/eid $pid/$eid appears to be dead.\n\n".
"Please look into this matter. $node has been reserved\n". "Please look into this matter. $node has been reserved\n".
"by the Testbed until this matter has been resolved.\n\n". "by the Testbed until this matter has been resolved.\n\n".
......
...@@ -358,7 +358,7 @@ sub fatal($) ...@@ -358,7 +358,7 @@ sub fatal($)
{ {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: Reload Daemon Died", $msg); SENDMAIL($TBOPS, "Reload Daemon Died", $msg);
die($msg); die($msg);
} }
...@@ -367,7 +367,7 @@ sub notify($) ...@@ -367,7 +367,7 @@ sub notify($)
my($mesg) = $_[0]; my($mesg) = $_[0];
print "$mesg\n"; print "$mesg\n";
SENDMAIL($TBOPS, "TESTBED: Reload Daemon Message", $mesg); SENDMAIL($TBOPS, "Reload Daemon Message", $mesg);
} }
# #
......
...@@ -115,6 +115,6 @@ exit(0); ...@@ -115,6 +115,6 @@ exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; local($msg) = $_[0];
SENDMAIL($TBOPS, "TESTBED: rmacct-ctrl Failed", $msg); SENDMAIL($TBOPS, "rmacct-ctrl Failed", $msg);
die("$0: $msg"); die("$0: $msg");
} }
...@@ -368,7 +368,7 @@ sub donotify($$) ...@@ -368,7 +368,7 @@ sub donotify($$)
} }
SENDMAIL($to, SENDMAIL($to,
"TESTBED: Group Update $subtext", "Group Update $subtext",
$mesg, $from, $hdrs, $mesg, $from, $hdrs,
($logname)); ($logname));
} }
...@@ -314,7 +314,7 @@ my $message = ...@@ -314,7 +314,7 @@ my $message =
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: New Experiment Created: $pid/$eid", "New Experiment Created: $pid/$eid",
$message, $message,
"$user_name <$user_email>", "$user_name <$user_email>",
"Bcc: $TBLOGS", "Bcc: $TBLOGS",
...@@ -349,7 +349,7 @@ sub fatal() ...@@ -349,7 +349,7 @@ sub fatal()
# Send a message to the testbed list. # Send a message to the testbed list.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Experiment Configure Failure: $pid/$eid", "Experiment Configure Failure: $pid/$eid",
$mesg, $mesg,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $TBOPS", "Cc: $TBOPS",
......
...@@ -310,7 +310,7 @@ my $message = ...@@ -310,7 +310,7 @@ my $message =
"in your message to $TBOPS\n"; "in your message to $TBOPS\n";
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Experiment $pid/$eid Swapped $inout", "Experiment $pid/$eid Swapped $inout",
$message, $message,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $expt_head_name <$expt_head_email>\n". "Cc: $expt_head_name <$expt_head_email>\n".
...@@ -345,7 +345,7 @@ sub fatal($) ...@@ -345,7 +345,7 @@ sub fatal($)
# Send a message to the testbed list. Append the logfile. # Send a message to the testbed list. Append the logfile.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Swap${inout} Failure: $pid/$eid", "Swap${inout} Failure: $pid/$eid",
$mesg, $mesg,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $expt_head_name <$expt_head_email>\n". "Cc: $expt_head_name <$expt_head_email>\n".
......
...@@ -324,7 +324,7 @@ if ($result) { ...@@ -324,7 +324,7 @@ if ($result) {
} }
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Image Creation on $node Completed: $pid/$imagename", "Image Creation on $node Completed: $pid/$imagename",
"Image creation on $node has completed. As you requested, the\n". "Image creation on $node has completed. As you requested, the\n".
"image has been written to $filename.\n". "image has been written to $filename.\n".
"You may now os_load this image on other nodes in your experiment.\n", "You may now os_load this image on other nodes in your experiment.\n",
...@@ -353,7 +353,7 @@ sub fatal($) ...@@ -353,7 +353,7 @@ sub fatal($)
# Send a message to the testbed list. # Send a message to the testbed list.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"TESTBED: Image Creation Failure on $node: $pid/$imagename", "Image Creation Failure on $node: $pid/$imagename",
$mesg, $mesg,
"$user_name <$user_email>", "$user_name <$user_email>",
"Cc: $TBOPS", "Cc: $TBOPS",
......
...@@ -82,8 +82,8 @@ if (strcmp($approval, "postpone") == 0) { ...@@ -82,8 +82,8 @@ if (strcmp($approval, "postpone") == 0) {
</h3>\n"; </h3>\n";
} }
elseif (strcmp($approval, "moreinfo") == 0) { elseif (strcmp($approval, "moreinfo") == 0) {
mail("$headname '$headuid' <$headuid_email>", TBMAIL("$headname '$headuid' <$headuid_email>",
"TESTBED: Project '$pid' Approval Postponed", "Project '$pid' Approval Postponed",
"\n". "\n".
"This message is to notify you that your project application\n". "This message is to notify you that your project application\n".
"for $pid has been postponed until we have more information.\n". "for $pid has been postponed until we have more information.\n".
...@@ -115,8 +115,8 @@ elseif ((strcmp($approval, "deny") == 0) || ...@@ -115,8 +115,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
DBQueryFatal("delete from groups where pid='$pid' and gid='$pid'"); DBQueryFatal("delete from groups where pid='$pid' and gid='$pid'");
DBQueryFatal("delete from projects where pid='$pid'"); DBQueryFatal("delete from projects where pid='$pid'");
mail("$headname '$headuid' <$headuid_email>", TBMAIL("$headname '$headuid' <$headuid_email>",
"TESTBED: Project '$pid' Denied", "Project '$pid' Denied",
"\n". "\n".
"This message is to notify you that your project application\n". "This message is to notify you that your project application\n".
"for $pid has been denied.\n". "for $pid has been denied.\n".
...@@ -136,8 +136,8 @@ elseif ((strcmp($approval, "deny") == 0) || ...@@ -136,8 +136,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
if (strcmp($approval, "destroy") == 0) { if (strcmp($approval, "destroy") == 0) {
DBQueryFatal("delete from users where uid='$headuid'"); DBQueryFatal("delete from users where uid='$headuid'");
mail("$headname '$headuid' <$headuid_email>", TBMAIL("$headname '$headuid' <$headuid_email>",
"TESTBED: Account '$headuid' Terminated", "Account '$headuid' Terminated",
"\n". "\n".
"This message is to notify you that your account has been \n". "This message is to notify you that your account has been \n".
"terminated because your project $pid was denied.\n". "terminated because your project $pid was denied.\n".
...@@ -185,8 +185,8 @@ elseif (strcmp($approval, "approve") == 0) { ...@@ -185,8 +185,8 @@ elseif (strcmp($approval, "approve") == 0) {
"WHERE uid='$headuid'"); "WHERE uid='$headuid'");
} }
mail("$headname '$headuid' <$headuid_email>", TBMAIL("$headname '$headuid' <$headuid_email>",
"TESTBED: Project '$pid' Approval", "Project '$pid' Approval",
"\n". "\n".
"This message is to notify you that your project $pid\n". "This message is to notify you that your project $pid\n".
"has been approved.\n". "has been approved.\n".
......
...@@ -360,8 +360,8 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) { ...@@ -360,8 +360,8 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
"where uid='$user' and pid='$project' and ". "where uid='$user' and pid='$project' and ".
" gid='$group'"); " gid='$group'");
mail("$user_name '$user' <$user_email>", TBMAIL("$user_name '$user' <$user_email>",
"TESTBED: Membership Denied in '$project/$group'", "Membership Denied in '$project/$group'",
"\n". "\n".
"This message is to notify you that you have been denied\n". "This message is to notify you that you have been denied\n".
"membership in project/group $project/$group.\n". "membership in project/group $project/$group.\n".
...@@ -470,8 +470,8 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) { ...@@ -470,8 +470,8 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
"WHERE uid='$user'"); "WHERE uid='$user'");
} }