#!/usr/bin/python
#
-# $Id$
-# $URL$
-#
# Copyright (c) 2003 Intel Corporation
# All rights reserved.
#
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:
log.write( "Unmounting disks.\n" )
utils.sysexec( "umount %s/vservers" % SYSIMG_PATH, log )
utils.sysexec( "umount %s/proc" % SYSIMG_PATH, log )
+ utils.sysexec_noerr( "umount %s/dev" % SYSIMG_PATH, log )
+ utils.sysexec_noerr( "umount %s/sys" % SYSIMG_PATH, log )
utils.sysexec( "umount %s" % SYSIMG_PATH, log )
utils.sysexec( "vgchange -an", 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
# 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