Various iSCSI fixes [PATCH 2/4]: anaconda-driveIsIscsi.patch

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

 



Hi all,

On newer kernels the symlinks are arranged differently, causing driveIsIscsi to fail to detect iscsi drives in current rawhide. This patch fixes this, fixing rh 461839, rh 461841.

Regards,

Hans
On newer kernels the symlinks are arranged differently, causing driveIsIscsi
to fail to detect iscsi drives in current rawhide. This patch fixes this,
fixing rh 461839, rh 461841.

diff --git a/isys/isys.py b/isys/isys.py
index 88a6987..8cec02a 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -893,7 +893,7 @@ def driveIsIscsi(device):
     # ewww.  just ewww.
     if not os.path.islink("/sys/block/%s/device" %(device,)):
         return False
-    target = os.readlink("/sys/block/%s/device" %(device,))
+    target = os.path.realpath("/sys/block/%s/device" %(device,))
     if re.search("/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*", target) is not None:
         return True
     return False
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux