[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/2] Fix booty error on s390 when /boot is not on LVM.



Followup to 39244f8f49ee3864edf8bd54f41a6a37864ed56d.  Extends the patch
to make we support /boot on ordinary partitions as well as LVM logical
volumes.

Related: rhbz#618376
---
 booty/s390.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/booty/s390.py b/booty/s390.py
index 00e9c08..40d7323 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -158,7 +158,13 @@ class s390BootloaderInfo(bootloaderInfo):
                                        stderr = "/dev/stderr")
             for line in rc.splitlines():
                 if line.startswith("Preparing boot device: "):
-                    self.setDevice(line.split()[-1].replace('.', ''))
+                    # Output here may look like:
+                    #     Preparing boot device: dasdb (0200).
+                    #     Preparing boot device: dasdl.
+                    # We want to extract the device name and pass that.
+
+                    fields = line[23:].split()
+                    self.setDevice(fields[0].replace('.', ''))
 
         return 0
 
-- 
1.7.3.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]