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/12/02 14:57:26 UTC

svn commit: r886145 - /incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Author: arkurth
Date: Wed Dec  2 13:57:25 2009
New Revision: 886145

URL: http://svn.apache.org/viewvc?rev=886145&view=rev
Log:
VCL-273
Added regex to utils.pm's write_currentimage_txt() subroutine to remove single quotes from the file contents before attempting to write them to currentimage.txt.  This should allow run_ssh_command() to handle the command if the user specified an image pretty name with a single quote/apostrophe.  I attempted escaping the single quotes and this did not work.

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=886145&r1=886144&r2=886145&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Wed Dec  2 13:57:25 2009
@@ -6072,6 +6072,9 @@
 	push @current_image_lines, "computer_hostname=$computer_host_name";
 
 	my $current_image_contents = join('\\r\\n', @current_image_lines);
+	
+	# Remove single quotes - they cause echo command to break
+	$current_image_contents =~ s/'//g;
 
 	#Make sure currentimage.txt writable
 	my $chown_command = "chown root currentimage.txt; chmod 777 currentimage.txt";