Provide a hook for code to be executed after every client machine reboot.

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1458 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autotest.py b/server/autotest.py
index 5fbaadb..919a01d 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -379,6 +379,7 @@
 						"boot after %ds" % (
 						self.host.hostname,
 						BOOT_TIME,))
+				self.host.reboot_followup()
 				continue
 			self.host.job.record("ABORT", None, None,
 					     "Autotest client terminated " +
diff --git a/server/hosts/base_classes.py b/server/hosts/base_classes.py
index 6054612..f6eba4a 100644
--- a/server/hosts/base_classes.py
+++ b/server/hosts/base_classes.py
@@ -56,6 +56,11 @@
 	def reboot_setup(self):
 		pass
 
+
+	def reboot_followup(self):
+		pass
+
+
 	def get_file(self, source, dest):
 		pass
 
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index 065ac64..158becf 100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -455,8 +455,13 @@
 				      "reboot command failed")
 			raise
 		if wait:
-			self.wait_for_restart(timeout)
-			self.__load_netconsole_module() # if the builtin fails
+			self.wait_for_restart(timeout) 
+			self.reboot_followup()
+
+
+	def reboot_followup(self):
+		super(SSHHost, self).reboot_followup()
+		self.__load_netconsole_module() # if the builtin fails
 
 
 	def __copy_files(self, sources, dest):