36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
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
|
|
|
|
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
|
---
|
|
scripts/rescan-scsi-bus.sh | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
|
index b1cbebc..5f867c4 100755
|
|
--- a/scripts/rescan-scsi-bus.sh
|
|
+++ b/scripts/rescan-scsi-bus.sh
|
|
@@ -289,7 +289,7 @@ testonline ()
|
|
print_and_scroll_back "$host:$channel:$id:$lun $SGDEV ($RMB) "
|
|
[ $RC = 2 ] && [ "$RMB" = "1" ] && break
|
|
done
|
|
- if [ $ctr != 0 ] ; then
|
|
+ if [ "$ctr" != 0 ] ; then
|
|
white_out
|
|
fi
|
|
# 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
|
|
--
|
|
2.35.3
|
|
|