You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2015/08/04 20:43:12 UTC

svn commit: r1694095 - in /vcl/trunk/managementnode/lib/VCL/Module: OS.pm OS/Linux.pm

Author: fapeeler
Date: Tue Aug  4 18:43:12 2015
New Revision: 1694095

URL: http://svn.apache.org/r1694095
Log:
VCL-871 

OS.pm - removed -n from the echo command
Linux.pm removed trailing new line from sudoers string


Modified:
    vcl/trunk/managementnode/lib/VCL/Module/OS.pm
    vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS.pm?rev=1694095&r1=1694094&r2=1694095&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS.pm Tue Aug  4 18:43:12 2015
@@ -2207,7 +2207,7 @@ sub create_text_file {
 		my $hex_string = join('', @hex_values);
 		
 		# Attempt to create/append the file using the hex string
-		my $command = "echo -n -e \"$hex_string\" $mode \"$file_path\"";
+		my $command = "echo -e \"$hex_string\" $mode \"$file_path\"";
 		my ($exit_status, $output) = $self->execute($command, 0, 15, 1);
 		if (!defined($output)) {
 			notify($ERRORS{'DEBUG'}, 0, "failed to execute command to $mode_string file on $computer_node_name, attempting to create file on management node and copy it to $computer_node_name");

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1694095&r1=1694094&r2=1694095&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Tue Aug  4 18:43:12 2015
@@ -2826,7 +2826,7 @@ sub grant_root_access {
 
 	if ($root_access) {
 		my $sudoers_file_path = '/etc/sudoers';
-		my $sudoers_line = "$username ALL= NOPASSWD: ALL\n";
+		my $sudoers_line = "$username ALL= NOPASSWD: ALL";
 		if ($self->append_text_file($sudoers_file_path, $sudoers_line)) {
 			notify($ERRORS{'DEBUG'}, 0, "appended line to $sudoers_file_path: '$sudoers_line'");
 			return 1;