Merge branch 'master' of ssh://git.onelab.eu/git/bootmanager
[bootmanager.git] / source / steps / ChainBootNode.py
index a279c1c..848cb3d 100644 (file)
@@ -13,6 +13,7 @@ import os
 
 import UpdateNodeConfiguration
 import MakeInitrd
+import StopRunlevelAgent
 from Exceptions import *
 import utils
 import systeminfo
@@ -143,6 +144,7 @@ def Run( vars, log ):
     update_vals['ssh_rsa_key']= ssh_host_key
     BootAPI.call_api_function( vars, "BootUpdateNode", (update_vals,) )
 
+
     # get the kernel version
     option = ''
     if NODE_MODEL_OPTIONS & ModelOptions.SMP:
@@ -165,6 +167,9 @@ def Run( vars, log ):
     ROOT_MOUNTED= 0
     vars['ROOT_MOUNTED']= 0
 
+    # Change runlevel to 'boot' prior to kexec.
+    StopRunlevelAgent.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