Author: arkurth
Date: Thu Oct 28 14:23:16 2010
New Revision: 1028312

URL: http://svn.apache.org/viewvc?rev=1028312&view=rev
Log:
VCL-411
Added call to Windows.pm::reserve to delete the VCL*cmd logon and logoff 
scripts if they exist.  This allows images already loaded to be fixed if 
affected with this problem.

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=1028312&r1=1028311&r2=1028312&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Thu Oct 28 
14:23:16 2010
@@ -751,17 +751,6 @@ sub post_load {
 
 =item *
 
- Delete legacy VCL logon/logoff scripts
-
-=cut
-       
-       my $system32_path = $self->get_system32_path();
-       if 
(!$self->delete_files_by_pattern("$system32_path/GroupPolicy/User/Scripts", 
".*VCL.*cmd", 2)) {
-               notify($ERRORS{'WARNING'}, 0, "failed to delete legacy VCL 
logon and logoff scripts");
-       }
-
-=item *
-
  Check if the imagemeta postoption is set to reboot, reboot if necessary
 
 =cut
@@ -883,6 +872,7 @@ sub grant_access {
 
        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 $remote_ip            = $self->data->get_reservation_remote_ip();
        my $multiple_users       = 
$self->data->get_imagemeta_usergroupmembercount();
        my $request_forimaging   = $self->data->get_request_forimaging();
@@ -927,6 +917,11 @@ sub grant_access {
                        return 0;
                }
        } ## end if ($request_forimaging)
+       
+       # Delete legacy VCL logon/logoff scripts
+       if 
(!$self->delete_files_by_pattern("$system32_path/GroupPolicy/User/Scripts", 
".*VCL.*cmd", 2)) {
+               notify($ERRORS{'WARNING'}, 0, "failed to delete legacy VCL 
logon and logoff scripts");
+       }
 
        notify($ERRORS{'OK'}, 0, "access has been granted for reservation on 
$computer_node_name");
        return 1;


Reply via email to