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

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



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

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