[PATCH 1/2] Try to use both udev_resolve_devspec(pv) and pv as device name

Vratislav Podzimek vpodzime at redhat.com
Fri Aug 17 12:27:19 UTC 2012


udev_resolve_devspec(pv) returns None if pv is has no
--onpart=/dev/disk/by... option. In such cases use pv name.

Resolves: rhbz#809640
---
 kickstart.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kickstart.py b/kickstart.py
index 167440a..eafaac3 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -1106,7 +1106,8 @@ class VolGroupData(commands.volgroup.F16_VolGroupData):
         for pv in self.physvols:
             # if pv is using --onpart, use original device
             pv = anaconda.id.ksdata.onPart.get(pv, pv)
-            dev = devicetree.getDeviceByName(udev_resolve_devspec(pv))
+            dev_name = udev_resolve_devspec(pv) or pv
+            dev = devicetree.getDeviceByName(dev_name)
             if dev and dev.format.type == "luks":
                 try:
                     dev = devicetree.getChildren(dev)[0]
-- 
1.7.11.2



More information about the anaconda-patches mailing list