Author: arkurth
Date: Tue Jul 20 16:55:32 2010
New Revision: 965905
URL: http://svn.apache.org/viewvc?rev=965905&view=rev
Log:
VCL-41
Removed lines from Windows.pm::clean_hard_drive which causes the driver cache
files to be deleted during image capture. This should only be done is Sysprep
is used and drivers are reinstalled on load. The run_sysprep subroutine does
this.
Other
Made minor update to improve the chown return value checking in
Windows.pm::set_file_owner. It wasn't working correctly if chown didn't return
any output.
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=965905&r1=965904&r2=965905&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Tue Jul 20
16:55:32 2010
@@ -1152,7 +1152,7 @@ sub move_file {
#/////////////////////////////////////////////////////////////////////////////
-=head2 delete_directory_contents
+=head2 delete_files_by_pattern
Parameters :
Returns :
@@ -1324,17 +1324,11 @@ sub set_file_owner {
my ($chown_exit_status, $chown_output) =
run_ssh_command($computer_node_name, $management_node_keys, "/usr/bin/chown.exe
-vR \"$owner\" \"$file_path\"", '', '', 0);
# Check if exit status is defined - if not, SSH command failed
- if (!defined($chown_exit_status)) {
+ if (!defined($chown_output)) {
notify($ERRORS{'WARNING'}, 0, "failed to run SSH command to set
$owner as the owner of $file_path");
return;
}
- # Make sure some output was returned
- if (!defined(@$chown_output)) {
- notify($ERRORS{'WARNING'}, 0, "error occurred setting $owner as
the owner of $file_path, chown output was not returned, exit status:
$chown_exit_status");
- return;
- }
-
# Check if any known error lines exist in the chown output
my @chown_error_lines = grep(/(chown:|cannot access|no such file|failed
to)/ig, @$chown_output);
if (@chown_error_lines) {
@@ -6042,11 +6036,8 @@ sub clean_hard_drive {
'$SYSTEMROOT,.*\\$NtUninstall.*,1',
'$SYSTEMROOT,.*\\$NtServicePackUninstall.*,1',
'$SYSTEMROOT,.*\\$MSI.*Uninstall.*,1',
- '$SYSTEMROOT/inf,.*INFCACHE\\.1',
- '$SYSTEMROOT/inf,.*[\\\\\\/]oem.*\\..*',
'$SYSTEMROOT,.*AFSCache,1',
'$SYSTEMROOT,.*afsd_init\\.log,1',
- '$SYSTEMDRIVE/Documents and Settings,.*\\.log,10',
'$SYSTEMDRIVE/Documents and Settings,.*Recent\\/.*,10',
'$SYSTEMDRIVE/Documents and Settings,.*Cookies\\/.*,10',
'$SYSTEMDRIVE/Documents and Settings,.*Temp\\/.*,10',