Author: arkurth Date: Wed Jun 10 20:36:29 2009 New Revision: 783493 URL: http://svn.apache.org/viewvc?rev=783493&view=rev Log: VCL-154 Added condition to utils.pm::run_scp_command() to check for permission denied errors.
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=783493&r1=783492&r2=783493&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Wed Jun 10 20:36:29 2009 @@ -6784,7 +6784,7 @@ notify($ERRORS{'WARNING'}, 0, "path2 was not specified"); return 0; } - + # Format the identity path string if ($identity_paths) { $identity_paths =~ s/^\s*/-i /; @@ -6913,6 +6913,10 @@ next; } + elsif ($scp_output =~ /permission denied/i) { + notify($ERRORS{'WARNING'}, 0, "scp permission denied error occurred: command: $scp_command, exit status: $scp_exit_status, output: $scp_output"); + return 0; + } else { notify($ERRORS{'OK'}, 0, "scp successful: attempt $attempts/$max_attempts, exit status: $scp_exit_status, output: $scp_output"); return 1; @@ -10349,15 +10353,15 @@ if ($pid = open(COMMAND, "$command 2>&1 |")) { # Capture the output of the command @output = <COMMAND>; - + # Save the exit status $exit_status = $? >> 8; - if ($? == -1) { - notify($ERRORS{'OK'}, 0, "\$? is set to $?, setting exit status to 0, Perl bug likely encountered"); - $exit_status = 0; - } - + if ($? == -1) { + notify($ERRORS{'OK'}, 0, "\$? is set to $?, setting exit status to 0, Perl bug likely encountered"); + $exit_status = 0; + } + # Close the command handle close(COMMAND); }