Author: arkurth
Date: Wed Aug 19 18:41:08 2009
New Revision: 805920

URL: http://svn.apache.org/viewvc?rev=805920&view=rev
Log:
VCL-196
Fixed bug in Windows.pm::configure_time_synchronization() for 64-bit OS's. The 
full path to w32tm.exe must be used or else the 32-bit version will be called 
and the time commands will fail. 

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=805920&r1=805919&r2=805920&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Wed Aug 19 
18:41:08 2009
@@ -7487,6 +7487,7 @@
        
        my $management_node_keys = $self->data->get_management_node_keys();
        my $computer_node_name   = $self->data->get_computer_node_name();
+       my $system32_path = $self->get_system32_path();
        
        my $time_source = "time.nist.gov time-a.nist.gov time-b.nist.gov 
time.windows.com";
        
@@ -7494,18 +7495,18 @@
        my $time_command;
        
        # Kill d4.exe if it's running, this will prevent Windows built-in time 
synchronization from working
-       $time_command .= "taskkill.exe /IM d4.exe /F 2>/dev/null ; ";
+       $time_command .= "$system32_path/taskkill.exe /IM d4.exe /F 2>/dev/null 
; ";
        
        # Register the w32time service
-       $time_command .= "w32tm.exe /register ; ";
+       $time_command .= "$system32_path/w32tm.exe /register ; ";
        
        # Start the service and configure it
        $time_command .= "net start w32time 2>/dev/null ; ";
-       $time_command .= "w32tm.exe /config /manualpeerlist:\"$time_source\" 
/syncfromflags:manual /update ; ";
+       $time_command .= "$system32_path/w32tm.exe /config 
/manualpeerlist:\"$time_source\" /syncfromflags:manual /update ; ";
        $time_command .= "net stop w32time && net start w32time ; ";
        
        # Synchronize the time
-       $time_command .= "w32tm.exe /resync /nowait";
+       $time_command .= "$system32_path/w32tm.exe /resync /nowait";
        
        # Run the assembled command
        my ($time_exit_status, $time_output) = 
run_ssh_command($computer_node_name, $management_node_keys, $time_command);


Reply via email to