summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorSteffen Maier <maier@linux.vnet.ibm.com>2009-07-06 07:15:05 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-07-06 16:07:24 -1000
commitbd1d78545a1380ad71a37801a8c9c967168100eb (patch)
tree30f77c0db452ff81451ed6f5134cad36e771bac8 /iutil.py
parent98e4ec049acab923d23ff8c99d78a101118ac921 (diff)
downloadanaconda-bd1d78545a1380ad71a37801a8c9c967168100eb.tar.gz
anaconda-bd1d78545a1380ad71a37801a8c9c967168100eb.tar.xz
anaconda-bd1d78545a1380ad71a37801a8c9c967168100eb.zip
fix backtrace in s390 reipl support due to missing anaconda.id.fsset (#509877)
Replaces previous post with fixed patch. Assuming anaconda.id.bootloader.device is always a disk device (not a partition) and it always contains the device /boot and hence the zipl bootloader is located on, this fixes the back trace.
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py30
1 files changed, 3 insertions, 27 deletions
diff --git a/iutil.py b/iutil.py
index 864922415..49509e993 100644
--- a/iutil.py
+++ b/iutil.py
@@ -764,13 +764,7 @@ def reIPLonCCW(iplsubdev, reipl_path):
device = "<unknown>"
try:
- iplbits = re.split ('([0-9]+)', iplsubdev)
- if len (iplbits) != 3:
- message = _("Error: %s splits into %s but not like we expect" % (iplsubdev,iplbits,))
- log.warning(message)
- raise Exception (message)
-
- device = os.readlink("/sys/block/" + iplbits[0] + "/device").split('/')[-1]
+ device = os.readlink("/sys/block/" + iplsubdev + "/device").split('/')[-1]
writeReiplMethod(reipl_path, 'ccw')
@@ -816,13 +810,7 @@ def reIPLonFCP(iplsubdev, reipl_path):
fcpvalue = { "device": "<unknown>", "wwpn": "<unknown>", "lun": "<unknown>" }
try:
- iplbits = re.split ('([0-9]+)', iplsubdev)
- if len (iplbits) != 3:
- message = _("Error: %s splits into %s but not like we expect" % (iplsubdev,iplbits,))
- log.warning(message)
- raise Exception (message)
-
- syspath = "/sys/block/" + iplbits[0] + "/device"
+ syspath = "/sys/block/" + iplsubdev + "/device"
fcpprops = [ ("hba_id", "device"), ("wwpn", "wwpn"), ("fcp_lun", "lun") ]
@@ -883,19 +871,7 @@ def reIPL(anaconda, loader_pid):
reipl_path = "/sys/firmware/reipl"
- iplfs = anaconda.id.fsset.getEntryByMountPoint("/boot")
- if iplfs is None:
- iplfs = anaconda.id.fsset.getEntryByMountPoint("/")
-
- if iplfs is None:
- message = _("Could not get information for mount point /boot or /")
- log.warning(message)
- return (message, instruction)
-
- try:
- ipldev = iplfs.device.device
- except:
- ipldev = None
+ ipldev = anaconda.id.bootloader.device
if ipldev is None:
message = _("Error determining mount point type")