Author: arkurth
Date: Tue Aug  4 16:10:02 2009
New Revision: 800859

URL: http://svn.apache.org/viewvc?rev=800859&view=rev
Log:
VCL-23
Fixed missing conditional in new.pm so that a random password is not generated 
for Linux non-standalone images.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/new.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/new.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/new.pm?rev=800859&r1=800858&r2=800859&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/new.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/new.pm Tue Aug  4 16:10:02 2009
@@ -1050,21 +1050,23 @@
                
                insertloadlog($reservation_id, $computer_id, "info", "node 
ready adding user account");
                
-               # Create a random password for the reservation
-               my $reservation_password = getpw();
-               
-               # Update the password in the reservation table
-               if (update_request_password($reservation_id, 
$reservation_password)) {
-                       notify($ERRORS{'DEBUG'}, 0, "updated password in the 
reservation table");
-               }
-               else {
-                       $self->reservation_failed("failed to update password in 
the reservation table");
+               # Create a random password and update the reservation table 
unless the reservation if for a Linux non-standalone image
+               unless ($image_os_type =~ /linux/ && !$user_standalone) {
+                       # Create a random password for the reservation
+                       my $reservation_password = getpw();
+                       
+                       # Update the password in the reservation table
+                       if (update_request_password($reservation_id, 
$reservation_password)) {
+                               notify($ERRORS{'DEBUG'}, 0, "updated password 
in the reservation table");
+                       }
+                       else {
+                               $self->reservation_failed("failed to update 
password in the reservation table");
+                       }
+                       
+                       # Set the password in the DataStructure object
+                       
$self->data->set_reservation_password($reservation_password);
                }
                
-               # Set the password in the DataStructure object
-               $self->data->set_reservation_password($reservation_password);
-               
-               
                # Check if OS module implements a reserve() subroutine
                if ($self->os->can('reserve')) {
                        # Call the OS module's reserve() subroutine


Reply via email to