diff --git a/SOURCES/59-fc-wwpn-id.rules b/SOURCES/59-fc-wwpn-id.rules index 81a20ad..5ad0a5c 100644 --- a/SOURCES/59-fc-wwpn-id.rules +++ b/SOURCES/59-fc-wwpn-id.rules @@ -7,9 +7,9 @@ KERNEL!="sd*", GOTO="fc_wwpn_end" ENV{DEVTYPE}=="disk", IMPORT{program}="fc_wwpn_id %p" ENV{DEVTYPE}=="partition", IMPORT{parent}="FC_*" -ENV{FC_TARGET_WWPN}!="$*"; GOTO="fc_wwpn_end" -ENV{FC_INITIATOR_WWPN}!="$*"; GOTO="fc_wwpn_end" -ENV{FC_TARGET_LUN}!="$*"; GOTO="fc_wwpn_end" +ENV{FC_TARGET_WWPN}!="?*", GOTO="fc_wwpn_end" +ENV{FC_INITIATOR_WWPN}!="?*", GOTO="fc_wwpn_end" +ENV{FC_TARGET_LUN}!="?*", GOTO="fc_wwpn_end" ENV{DEVTYPE}=="disk", SYMLINK+="disk/by-path/fc-$env{FC_INITIATOR_WWPN}-$env{FC_TARGET_WWPN}-lun-$env{FC_TARGET_LUN}" ENV{DEVTYPE}=="partition", SYMLINK+="disk/by-path/fc-$env{FC_INITIATOR_WWPN}-$env{FC_TARGET_WWPN}-lun-$env{FC_TARGET_LUN}-part%n" diff --git a/SOURCES/fc_wwpn_id b/SOURCES/fc_wwpn_id index c8d0189..b05c5e8 100644 --- a/SOURCES/fc_wwpn_id +++ b/SOURCES/fc_wwpn_id @@ -38,7 +38,9 @@ while [ -n "$d" ] ; do esac done -echo "FC_TARGET_LUN=$target_lun" +if [ -n "$rport_wwpn" ] || [ -n "$host_wwpn" ] ; then + echo "FC_TARGET_LUN=$target_lun" +fi if [ -n "$rport_wwpn" ] ; then echo "FC_TARGET_WWPN=$rport_wwpn" diff --git a/SPECS/sg3_utils.spec b/SPECS/sg3_utils.spec index b092619..a2e8311 100644 --- a/SPECS/sg3_utils.spec +++ b/SPECS/sg3_utils.spec @@ -3,7 +3,7 @@ Summary: Utilities for devices that use SCSI command sets Name: sg3_utils Version: 1.37 -Release: 18%{?dist}.1 +Release: 18%{?dist}.2 License: GPLv2+ and BSD Group: Applications/System Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz @@ -139,6 +139,9 @@ install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_prefix}/lib/udev/ %changelog +* Thu Jan 09 2020 Tomas Bzatek 1.37-18.el7_7.2 +- Fix the 59-fc-wwpn-id.rules syntax (#1788876) + * Fri Aug 16 2019 Tomas Bzatek 1.37-18.el7_7.1 - Add 59-fc-wwpn-id.rules (#1684302)