import systeminfo
import BootAPI
import notify_messages
+import time
import ModelOptions
# update node packages
log.write( "Running node update.\n" )
- cmd = "chroot %s /usr/bin/NodeUpdate.py start noreboot" \
- % SYSIMG_PATH
+ if os.path.exists( SYSIMG_PATH + "/usr/bin/NodeUpdate.py" ):
+ cmd = "chroot %s /usr/bin/NodeUpdate.py start noreboot" % SYSIMG_PATH
+ else:
+ # for backwards compatibility
+ cmd = "chroot %s /usr/local/planetlab/bin/NodeUpdate.py start noreboot" % SYSIMG_PATH
utils.sysexec( cmd, log )
log.write( "Updating ssh public host key with PLC.\n" )
utils.sysexec( "cp %s/boot/kernel-boot%s /tmp/kernel" % (SYSIMG_PATH,option), log )
utils.sysexec( "cp %s/boot/initrd-boot%s /tmp/initrd" % (SYSIMG_PATH,option), log )
+ BootAPI.save(vars)
+
log.write( "Unmounting disks.\n" )
try:
# backwards compat, though, we should never hit this case post PL 3.2
if module != "":
log.write( "Unloading %s\n" % module )
utils.sysexec_noerr( "modprobe -r %s" % module, log )
+ if module == "e1000":
+ log.write("Unloading e1000 driver; sleeping 4 seconds...\n")
+ time.sleep(4)
modules.close()
except IOError:
# problems during chain boot, such as USB host
# controller drivers (HCDs) (PL6577).
# if int(parts[2]) == 0:
- if re.search('_hcd$', parts[0]):
+ if False and re.search('_hcd$', parts[0]):
if usb_usage > 0:
log.write( "NOT unloading %s since USB may be in use\n" % parts[0] )
else: