From 48bd014c62be29904375de5144350bc935a4c029 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Sat, 13 Jan 2007 18:05:58 +0000 Subject: [PATCH] - fix get_partition_path_from_device() to work with 2.x cds that may or may not use devfs --- source/steps/InstallPartitionDisks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index d7c6468..42ce5e5 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -293,11 +293,14 @@ def get_partition_path_from_device( device, vars, log ): 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 -- 2.43.0