update 0001-sg3_utils-1.37-rescan-downpress.patch.
This commit is contained in:
parent
9fe32bfc31
commit
7eab0b1e92
@ -1,17 +1,26 @@
|
|||||||
|
From faee7759e949f04f4555e9a84e7845d4299d94da Mon Sep 17 00:00:00 2001
|
||||||
|
From: sunshihao <sunshihao@huawei.com>
|
||||||
|
Date: Thu, 16 Apr 2020 10:48:26 +0800
|
||||||
|
Subject: [PATCH 2/4] sg3_utils-1.37-rescan-downpress
|
||||||
|
|
||||||
|
---
|
||||||
|
scripts/rescan-scsi-bus.sh | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
||||||
index 16041ee..e411fd2 100755
|
index 855cec9..b1cbebc 100755
|
||||||
--- a/scripts/rescan-scsi-bus.sh
|
--- a/scripts/rescan-scsi-bus.sh
|
||||||
+++ b/scripts/rescan-scsi-bus.sh
|
+++ b/scripts/rescan-scsi-bus.sh
|
||||||
@@ -713,6 +713,7 @@ findremapped()
|
@@ -786,6 +786,7 @@ findremapped()
|
||||||
rm -f $tmpfile
|
rm -f $tmpfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+ echo -n "Triggering udev to update device information... "
|
+ echo -n "Triggering udev to update device information... "
|
||||||
# Get all of the ID_SERIAL attributes, after finding their sd node
|
# Get all of the ID_SERIAL attributes, after finding their sd node
|
||||||
|
devs=$(ls /sys/class/scsi_device/)
|
||||||
for hctl in $devs ; do
|
for hctl in $devs ; do
|
||||||
if [ -d /sys/class/scsi_device/$hctl/device/block ] ; then
|
@@ -794,12 +795,14 @@ findremapped()
|
||||||
@@ -720,12 +721,14 @@ findremapped()
|
id_serial_old=$(udevadm info -q all -n "$sddev" | grep "ID_SERIAL=" | cut -d"=" -f2)
|
||||||
id_serial_old=`udevadm info -q all -n $sddev | grep "ID_SERIAL=" | cut -d"=" -f2`
|
|
||||||
[ -z "$id_serial_old" ] && id_serial_old="none"
|
[ -z "$id_serial_old" ] && id_serial_old="none"
|
||||||
echo "$hctl $sddev $id_serial_old" >> $tmpfile
|
echo "$hctl $sddev $id_serial_old" >> $tmpfile
|
||||||
+ udevadm trigger --name-match=$sddev
|
+ udevadm trigger --name-match=$sddev
|
||||||
@ -27,3 +36,6 @@ index 16041ee..e411fd2 100755
|
|||||||
udevadm_settle 2>&1 /dev/null
|
udevadm_settle 2>&1 /dev/null
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user