You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2009/04/06 20:17:03 UTC
svn commit: r762447 - /incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
Author: arkurth
Date: Mon Apr 6 18:17:03 2009
New Revision: 762447
URL: http://svn.apache.org/viewvc?rev=762447&view=rev
Log:
Added space between -f and the $RETURNPATH variable in utils.pm::Mail::Mailer(). If $RETURNPATH is not set and without a space, sendmail displays an error and doesn't send the message:
/usr/lib/sendmail: option requires an argument -- f
Made minor update to run_ssh_command() output. If the exit status of the executed command isn't 0, it displays the full SSH command. This is useful for debugging.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=762447&r1=762446&r2=762447&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Mon Apr 6 18:17:03 2009
@@ -1273,7 +1273,7 @@
if (!(defined($from))) {
$from = $DEFAULTHELPEMAIL;
}
- my $localreturnpath = "-f$RETURNPATH";
+ my $localreturnpath = "-f $RETURNPATH";
my $mailer = Mail::Mailer->new("sendmail", $localreturnpath);
if ($SHARED_MAILBOX) {
@@ -6781,7 +6781,14 @@
$ssh_output_summary = substr($ssh_output_summary, 0, 30);
$ssh_output_summary .= "...";
}
- notify($ERRORS{'DEBUG'}, 0, "SSH command executed on $node, returning ($exit_status, \"$ssh_output_summary\")");
+
+ # Display the full ssh command if the exit status is not 0
+ if ($exit_status) {
+ notify($ERRORS{'OK'}, 0, "SSH command executed on $node, command:\n$ssh_command\nreturning ($exit_status, \"$ssh_output_summary\")");
+ }
+ else {
+ notify($ERRORS{'DEBUG'}, 0, "SSH command executed on $node, returning ($exit_status, \"$ssh_output_summary\")");
+ }
# Return the exit status and output
return ($exit_status, \@output_lines);