Author: arkurth
Date: Thu May 17 16:19:50 2012
New Revision: 1339684

URL: http://svn.apache.org/viewvc?rev=1339684&view=rev
Log:
VCL-589
Added call to set permissions in each file copy loop in 
copy_capture_configuration_files. Moved call to set permissions for the SYSTEM 
user to Version_6.pm::run_sysprep. It is calling icacle.exe which isn't 
available in Windows 5.x.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.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=1339684&r1=1339683&r2=1339684&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Thu May 17 
16:19:50 2012
@@ -6685,24 +6685,23 @@ sub copy_capture_configuration_files {
                notify($ERRORS{'OK'}, 0, "copying image capture configuration 
files from $source_configuration_directory to $computer_node_name");
                if (run_scp_command("$source_configuration_directory/*", 
"$computer_node_name:$NODE_CONFIGURATION_DIRECTORY", $management_node_keys)) {
                        notify($ERRORS{'OK'}, 0, "copied 
$source_configuration_directory directory to 
$computer_node_name:$NODE_CONFIGURATION_DIRECTORY");
-               } ## end if 
(run_scp_command("$source_configuration_directory/*"...
+                       
+                       notify($ERRORS{'DEBUG'}, 0, "setting permissions of 
$NODE_CONFIGURATION_DIRECTORY to 777 on $computer_node_name");
+                       $self->execute("/usr/bin/chmod.exe -R 777 
$NODE_CONFIGURATION_DIRECTORY");
+               }
                else {
                        notify($ERRORS{'WARNING'}, 0, "failed to copy 
$source_configuration_directory to $computer_node_name");
                        return;
                }
        }
        
-       $self->set_file_owner($NODE_CONFIGURATION_DIRECTORY, 
'root:Administrators');
-       $self->execute("/usr/bin/chmod.exe -Rv 777 
$NODE_CONFIGURATION_DIRECTORY", 1);
-       
-       # Grant permissions to the SYSTEM user - this is needed or else Sysprep 
fails
-       $self->execute("cmd.exe /c \"$system32_path/icacls.exe 
$NODE_CONFIGURATION_DIRECTORY /grant SYSTEM:(OI)(CI)(F) /C\"", 1);
-       
        # Delete any Subversion files which may have been copied
        if (!$self->delete_files_by_pattern($NODE_CONFIGURATION_DIRECTORY, 
'.*\.svn.*')) {
                notify($ERRORS{'WARNING'}, 0, "unable to delete Subversion 
files under: $NODE_CONFIGURATION_DIRECTORY");
        }
        
+       $self->set_file_owner($NODE_CONFIGURATION_DIRECTORY, 'root');
+       
        # Find any files containing a 'WINDOWS_ROOT_PASSWORD' string and 
replace it with the root password
        if ($self->search_and_replace_in_files($NODE_CONFIGURATION_DIRECTORY, 
'WINDOWS_ROOT_PASSWORD', $WINDOWS_ROOT_PASSWORD)) {
                notify($ERRORS{'DEBUG'}, 0, "set the Windows root password in 
configuration files");

Modified: 
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm?rev=1339684&r1=1339683&r2=1339684&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm 
Thu May 17 16:19:50 2012
@@ -1839,6 +1839,9 @@ EOF
        # Delete legacy Sysprep directory
        $self->delete_file("C:/Cygwin/home/root/VCL/Utilities/Sysprep");
        
+       # Grant permissions to the SYSTEM user - this is needed or else Sysprep 
fails
+       $self->execute("cmd.exe /c \"$system32_path/icacls.exe 
$node_configuration_directory /grant SYSTEM:(OI)(CI)(F) /C\"");
+       
        # Uninstall and reinstall MsDTC
        my $msdtc_command = "$system32_path/msdtc.exe -uninstall ; 
$system32_path/msdtc.exe -install";
        my ($msdtc_status, $msdtc_output) = 
run_ssh_command($computer_node_name, $management_node_keys, $msdtc_command);
@@ -1853,7 +1856,7 @@ EOF
        }
        
        # Get the node drivers directory and convert it to DOS format
-       my $drivers_directory = $self->get_node_configuration_directory() . 
'/Drivers';
+       my $drivers_directory = "$node_configuration_directory/Drivers";
        $drivers_directory =~ s/\//\\\\/g;
        
        # Set the Installation Sources registry key


Reply via email to