Author: arkurth
Date: Mon Aug 3 20:29:35 2009
New Revision: 800536
URL: http://svn.apache.org/viewvc?rev=800536&view=rev
Log:
VCL-23
Fixed bug in Windows.pm::search_and_replace_in_files() which was encountered if
grep displayed a "permission denied" error when processing a file. This usually
happens on .exe files. Added code so that grep output lines containing ".exe"
are ignored.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=800536&r1=800535&r2=800536&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Mon Aug 3
20:29:35 2009
@@ -4216,7 +4216,7 @@
# Set the key to allow remote connections whenever enabling RDP
# Include this in the SSH command along with the netsh.exe commands
rather than calling it separately for faster execution
$netsh_command .= 'reg.exe ADD
"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server" /t
REG_DWORD /v fDenyTSConnections /d 0 /f ; ';
-
+
$netsh_command .= "netsh.exe firewall set portopening";
$netsh_command .= " name = \"Remote Desktop\"";
$netsh_command .= " protocol = TCP";
@@ -5634,7 +5634,7 @@
}
# Run grep to find files matching pattern
- my $grep_command = "/bin/grep -ilr \"$search_pattern\"
\"$base_directory\"";
+ my $grep_command = "/bin/grep -ilr \"$search_pattern\"
\"$base_directory\" 2>&1 | grep -Ev \"\.(exe|dll)\"";
my ($grep_status, $grep_output) = run_ssh_command($computer_node_name,
$management_node_keys, $grep_command);
if (!defined($grep_status)) {
notify($ERRORS{'WARNING'}, 0, "unable to run ssh command to run
grep on directory: $base_directory, pattern: $search_pattern");