You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2009/09/29 17:49:49 UTC

svn commit: r819995 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Author: fapeeler
Date: Tue Sep 29 15:49:49 2009
New Revision: 819995

URL: http://svn.apache.org/viewvc?rev=819995&view=rev
Log:
VCL-238

moved shutdown -h now command into pre_capture routine

removed legacy capture_start routine


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=819995&r1=819994&r2=819995&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Tue Sep 29 15:49:49 2009
@@ -143,42 +143,15 @@
 		}
 	} ## end if ($IPCONFIGURATION eq "static")
 
-	notify($ERRORS{'OK'}, 0, "returning 1");
-	return 1;
-} ## end sub capture_prepare
-
-#/////////////////////////////////////////////////////////////////////////////
-
-=head2 capture_start
-
- Parameters  :
- Returns     :
- Description :
-
-=cut
-
-sub capture_start {
-	my $self = shift;
-	if (ref($self) !~ /linux/i) {
-		notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a function, it must be called as a class method");
-		return 0;
-	}
-
-	my $management_node_keys = $self->data->get_management_node_keys();
-	my $image_name           = $self->data->get_image_name();
-	my $computer_short_name  = $self->data->get_computer_short_name();
-	my $computer_node_name   = $self->data->get_computer_node_name();
-
-	notify($ERRORS{'OK'}, 0, "initiating Linux image capture: $image_name on $computer_short_name");
-
+	#shutdown node
 	notify($ERRORS{'OK'}, 0, "initating reboot for Linux imaging sequence");
 	run_ssh_command($computer_node_name, $management_node_keys, "/sbin/shutdown -r now", "root");
-	notify($ERRORS{'OK'}, 0, "sleeping for 90 seconds while machine shuts down and reboots");
-	sleep 90;
+	notify($ERRORS{'OK'}, 0, "sleeping for 60 seconds while machine shuts down and reboots");
+	sleep 60;
 
 	notify($ERRORS{'OK'}, 0, "returning 1");
 	return 1;
-} ## end sub capture_start
+} ## end sub capture_prepare
 
 #/////////////////////////////////////////////////////////////////////////////