sg3_utils/0002-bugfix-sg3_utils-fix-syntax-error.patch

36 lines
1.3 KiB
Diff
Raw Normal View History

From 1d2cf4e2a477646b212b25d6d6be5fee99e20bdb Mon Sep 17 00:00:00 2001
From: sunshihao <sunshihao@huawei.com>
Date: Thu, 16 Apr 2020 10:53:25 +0800
Subject: [PATCH 3/4] bugfix-sg3_utils-fix-syntax-error
2019-09-30 11:17:00 -04:00
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2019-09-30 11:17:00 -04:00
---
scripts/rescan-scsi-bus.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
2019-09-30 11:17:00 -04:00
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index b1cbebc..5f867c4 100755
2019-09-30 11:17:00 -04:00
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -289,7 +289,7 @@ testonline ()
2019-09-30 11:17:00 -04:00
print_and_scroll_back "$host:$channel:$id:$lun $SGDEV ($RMB) "
[ $RC = 2 ] && [ "$RMB" = "1" ] && break
2019-09-30 11:17:00 -04:00
done
- if [ $ctr != 0 ] ; then
+ if [ "$ctr" != 0 ] ; then
white_out
fi
2019-09-30 11:17:00 -04:00
# echo -e "\e[A\e[A\e[A${yellow}Test existence of $SGDEV = $RC ${norm} \n\n\n"
@@ -1283,7 +1283,7 @@ if [ "$sync" = 2 ] ; then
echo "Syncing file systems"
sync
fi
-if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ $scan_flags != 0 ] ; then
+if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ "$scan_flags" != 0 ] ; then
OLD_SCANFLAGS=$(cat /sys/module/scsi_mod/parameters/default_dev_flags)
NEW_SCANFLAGS=$((OLD_SCANFLAGS|scan_flags))
if [ "$OLD_SCANFLAGS" != "$NEW_SCANFLAGS" ] ; then
2019-09-30 11:17:00 -04:00
--
2.35.3
2019-09-30 11:17:00 -04:00