Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37543350
en ru br
Репозитории ALT
S:1.47-alt1
5.1: 1.27-alt2
4.1: 1.23-alt2
4.0: 1.23-alt2
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: sg3_utils

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: sg3_utils-rh-fc_wwpn_id-non_FC-devices.patch
Скачать


From 37b8af8278bba0b116b579950218f2e610a2ab2b Mon Sep 17 00:00:00 2001
From: jtpittman195 <jpittman@redhat.com>
Date: Fri, 4 Oct 2019 10:58:24 -0400
Subject: [PATCH] fc_wwpn_id: add condition to FC_TARGET_LUN return
If there is no relevant fc_remote_port or fc_host found, there is no need to return the target_lun number.  Returning with no condition causes a FC_TARGET_LUN value to be present in the udev database for devices that are not fibre attached.  Add condition to check.
---
 scripts/fc_wwpn_id | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/fc_wwpn_id b/scripts/fc_wwpn_id
index c8d0189..b05c5e8 100644
--- a/scripts/fc_wwpn_id
+++ b/scripts/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"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin