# 2.x cds have different libparted that 3.x cds, and they have
# different interfaces
- if BOOT_CD_VERSION[0] == 3:
+ if BOOT_CD_VERSION[0] >= 3:
# create a new partition table
disk= dev.disk_new_fresh(parted.disk_type_get("msdos"))
BOOT_CD_VERSION= vars["BOOT_CD_VERSION"]
# those who wrote the cciss driver just had to make it difficult
- if BOOT_CD_VERSION[0] == 3:
+ if BOOT_CD_VERSION[0] >= 3:
cciss_test= "/dev/cciss"
if device[:len(cciss_test)] == cciss_test:
part_path= device + "p1"
else:
part_path= device + "1"
else:
- # since device ends in /disc, we need to make it end in
+ # if device ends in /disc, we need to make it end in
# /part1 to indicate the first partition (for devfs based 2.x cds)
dev_parts= string.split(device,"/")
- dev_parts[len(dev_parts)-1]= "part1"
- part_path= string.join(dev_parts,"/")
+ if dev_parts[-1] == "disc":
+ dev_parts[-1]= "part1"
+ part_path= string.join(dev_parts,"/")
+ else:
+ part_path= device + "1"
return part_path