diff --git a/0001-sg3_utils-1.37-rescan-downpress.patch b/0001-sg3_utils-1.37-rescan-downpress.patch index 2426608..f44856e 100644 --- a/0001-sg3_utils-1.37-rescan-downpress.patch +++ b/0001-sg3_utils-1.37-rescan-downpress.patch @@ -1,17 +1,26 @@ +From faee7759e949f04f4555e9a84e7845d4299d94da Mon Sep 17 00:00:00 2001 +From: sunshihao +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 -index 16041ee..e411fd2 100755 +index 855cec9..b1cbebc 100755 --- a/scripts/rescan-scsi-bus.sh +++ b/scripts/rescan-scsi-bus.sh -@@ -713,6 +713,7 @@ findremapped() +@@ -786,6 +786,7 @@ findremapped() rm -f $tmpfile fi + echo -n "Triggering udev to update device information... " # Get all of the ID_SERIAL attributes, after finding their sd node + devs=$(ls /sys/class/scsi_device/) for hctl in $devs ; do - if [ -d /sys/class/scsi_device/$hctl/device/block ] ; then -@@ -720,12 +721,14 @@ findremapped() - id_serial_old=`udevadm info -q all -n $sddev | grep "ID_SERIAL=" | cut -d"=" -f2` +@@ -794,12 +795,14 @@ findremapped() + id_serial_old=$(udevadm info -q all -n "$sddev" | grep "ID_SERIAL=" | cut -d"=" -f2) [ -z "$id_serial_old" ] && id_serial_old="none" echo "$hctl $sddev $id_serial_old" >> $tmpfile + udevadm trigger --name-match=$sddev @@ -27,3 +36,6 @@ index 16041ee..e411fd2 100755 udevadm_settle 2>&1 /dev/null echo "Done" +-- +2.19.1 +