The logical device name to open firmware path translation for fibre-channel
devices can fail on systems where the fc_remote_ports file in sysfs has a
slightly different name. On some systems this file appears as
fc_remote_ports:rport-X:Y-Z. This patch corrects the lookup of this file.
Signed-off-by: Nathan Fontenot <nf...@au...>
---
scripts/ofpathname | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/ofpathname b/scripts/ofpathname
index db57bbe..a699353 100755
--- a/scripts/ofpathname
+++ b/scripts/ofpathname
@@ -905,7 +905,7 @@ of2l_fc()
link=$PWD
# find device_path, not all dirs will have a fc_remote_ports
- goto_dir $PWD "fc_remote_ports" 0
+ goto_dir $PWD "fc_remote_ports*" 0
if [[ $? -eq 1 ]]; then
continue
fi
@@ -920,7 +920,7 @@ of2l_fc()
fi
local fc_lun=`get_fc_scsilun $LUN`
- local wwpn=`get_fc_wwpn "$device_path"`
+ local wwpn=`get_fc_wwpn "$device_path/fc_remote_ports*"`
if [[ $fc_lun = $OF_LUN && $wwpn = $OF_WWPN ]]; then
LOGICAL_DEVNAME="${dir##*/}"
|