3 # Copyright (c) 2003 Intel Corporation
6 # Copyright (c) 2004-2006 The Trustees of Princeton University
12 from Exceptions import *
18 Stop the RunlevelAgent.py script. Should proceed
19 kexec to reset run_level to 'boot' before kexec
22 log.write( "\n\nStep: Stopping RunlevelAgent.py\n" )
25 cmd = "%s/RunlevelAgent.py" % vars['BM_SOURCE_DIR']
26 # raise error if script is not present.
28 os.system("/usr/bin/python %s stop" % cmd)
30 raise BootManagerException, "Missing variable in vars: %s\n" % var
31 except ValueError, var:
32 raise BootManagerException, "Variable in vars, shouldn't be: %s\n" % var
36 update_vals['run_level']='boot'
37 BootAPI.call_api_function( vars, "ReportRunlevel", (update_vals,) )
38 except BootManagerException, e:
39 log.write( "Unable to update boot state for this node at PLC: %s.\n" % e )