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";