for device in all_devices.keys():
- (major,minor,blocks,gb_size,readonly) = all_devices[device]
+ (major, minor, blocks, gb_size, readonly) = all_devices[device]
if device[:14] == "/dev/planetlab":
log.write("Skipping device {} in volume group.\n".format(device))
if line.startswith(prefix):
installed_nodefamily = line.replace(prefix,"").strip()
installed_pldistro, installed_fcdistro, installed_arch = installed_nodefamily.split('-')
+ # do not break here, bm-install is additive, we want the last one..
with open("{}/etc/planetlab/virt".format(sysimg)) as infile:
installed_virt = infile.read().strip()
except Exception as e:
if method == "dhcp":
utils.sysexec("cp /etc/resolv.conf {}/etc/".format(SYSIMG_PATH), log)
- log.write("Writing node install version\n")
+ log.write("Writing node install_version\n")
utils.makedirs("{}/etc/planetlab".format(SYSIMG_PATH))
ver = file("{}/etc/planetlab/install_version".format(SYSIMG_PATH), "w")
ver.write("{}\n".format(VERSION))
utils.sysexec("vgscan", log)
utils.sysexec("vgchange -ay planetlab", log)
except BootManagerException as e:
- log.write("BootManagerException during vgscan/vgchange: {}\n"\
- .format(str(e)))
+ log.write("BootManagerException during vgscan/vgchange: {}\n".format(e))
return 0
utils.makedirs(SYSIMG_PATH)
# in seconds : if no input, proceed
PROMPT_TIMEOUT = 5
-def prompt_for_breakpoint_mode ():
+def prompt_for_breakpoint_mode():
global BREAKPOINT_MODE
if PROMPT_MODE:
same as sysexec, but capture boot manager exceptions
"""
try:
- rc= 0
- rc= sysexec(cmd, log, shell=shell)
+ rc = 0
+ rc = sysexec(cmd, log, shell=shell)
except BootManagerException as e:
pass