always pass log to sysexec for consistency between bm.log and tty output
[bootmanager.git] / source / steps / ChainBootNode.py
index 6e11cfd..3b9df6d 100644 (file)
@@ -1,8 +1,5 @@
 #!/usr/bin/python
 #
-# $Id$
-# $URL$
-#
 # Copyright (c) 2003 Intel Corporation
 # All rights reserved.
 #
@@ -143,7 +140,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
@@ -169,7 +166,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
@@ -265,11 +262,10 @@ def Run( vars, log ):
         # kargs, which is ramdisk_size=8192
         pass 
 
-    utils.sysexec_noerr( 'hwclock --systohc --utc ' )
+    utils.sysexec_noerr( 'hwclock --systohc --utc ', log )
     utils.breakpoint ("Before kexec");
     try:
-        utils.sysexec( 'kexec --force --initrd=/tmp/initrd ' \
-                       '--append="%s" /tmp/kernel' % kargs)
+        utils.sysexec( 'kexec --force --initrd=/tmp/initrd --append="%s" /tmp/kernel' % kargs, log)
     except BootManagerException, e:
         # if kexec fails, we've shut the machine down to a point where nothing
         # can run usefully anymore (network down, all modules unloaded, file