代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/sg3_utils 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 424d6468d62d09328c19cd54de1132be0940f049 Mon Sep 17 00:00:00 2001
From: sunshihao <sunshihao@huawei.com>
Date: Thu, 16 Apr 2020 11:05:20 +0800
Subject: [PATCH 4/4] sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error
---
scripts/rescan-scsi-bus.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index 25a5f2a..dc3026a 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -491,7 +491,7 @@ dolunscan()
# Well known lun transition case. Only for Direct-Access devs (type 0)
# If block directory exists && and PQUAL != 0, we unmapped lun0 and just have a well-known lun
# If block directory doesn't exist && PQUAL == 0, we mapped a real lun0
- if [ "$lun" -eq 0 ] && [ $IPTYPE -eq 0 ] ; then
+ if [ x"$lun" = x0 ] && [ x$IPTYPE = x0 ] ; then
if [ $RC = 2 ] ; then
if [ -e "$devpath" ] ; then
if [ -d "$devpath/block" ] ; then
@@ -500,7 +500,7 @@ dolunscan()
RC=0 # Set this so the system leaves the existing well known lun alone. This is a lun 0 with no block directory
fi
fi
- elif [ $RC = 0 ] && [ $IPTYPE -eq 0 ] ; then
+ elif [ $RC = 0 ] && [ x$IPTYPE = x0 ] ; then
if [ -e "$devpath" ] ; then
if [ ! -d "$devpath/block" ] ; then
remappedlun0=1 # Transition from well-known to real lun 0
@@ -512,7 +512,7 @@ dolunscan()
# Special case: lun 0 just got added (for reportlunscan),
# so make sure we correctly treat it as new
- if [ "$lun" = "0" ] && [ "$1" = "1" ] && [ -z "$remappedlun0" ] ; then
+ if [ x"$lun" = x"0" ] && [ x"$1" = x"1" ] && [ -z "$remappedlun0" ] ; then
SCSISTR=""
printf "\r\e[A\e[A\e[A"
fi
@@ -535,7 +535,7 @@ dolunscan()
sleep 0.02
else
echo "scsi remove-single-device $devnr" > /proc/scsi/scsi
- if [ $RC -eq 1 ] || [ "$lun" -eq 0 ] ; then
+ if [ $RC -eq 1 ] || [ x"$lun" = x0 ] ; then
# Try readding, should fail if device is gone
echo "scsi add-single-device $devnr" > /proc/scsi/scsi
fi
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。