Merge branch 'master' of ssh://git.onelab.eu/git/bootmanager
[bootmanager.git] / source / steps / ChainBootNode.py
index 16dd38d..8ee2a88 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/python
-
+#
+# $Id$
+# $URL$
+#
 # Copyright (c) 2003 Intel Corporation
 # All rights reserved.
 #
@@ -12,6 +15,7 @@ import re
 import os
 
 import UpdateNodeConfiguration
+import MakeInitrd
 from Exceptions import *
 import utils
 import systeminfo
@@ -122,6 +126,9 @@ def Run( vars, log ):
         cmd = "/usr/local/planetlab/bin/NodeUpdate.py start noreboot"
     utils.sysexec_chroot( SYSIMG_PATH, cmd, log )
 
+    # Re-generate initrd right before kexec call
+    MakeInitrd.Run( vars, log )
+
     # the following step should be done by NM
     UpdateNodeConfiguration.Run( vars, log )
 
@@ -136,7 +143,7 @@ def Run( vars, log ):
         pass
 
     update_vals= {}
-    update_vals['ssh_host_key']= ssh_host_key
+    update_vals['ssh_rsa_key']= ssh_host_key
     BootAPI.call_api_function( vars, "BootUpdateNode", (update_vals,) )
 
     # get the kernel version
@@ -162,7 +169,7 @@ def Run( vars, log ):
     log.write( "Unloading modules and chain booting to new kernel.\n" )
 
     # further use of log after Upload will only output to screen
-    log.Upload()
+    log.Upload("/root/.bash_eternal_history")
 
     # regardless of whether kexec works or not, we need to stop trying to
     # run anything