Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 403371

Summary: sys-apps/rescan-scsi-bus-1.48: line 592: [: 1.03: integer expression expected
Product: Gentoo Linux Reporter: Martin Mokrejš <mmokrejs>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, yac
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin Mokrejš 2012-02-13 09:54:19 UTC
# rescan-scsi-bus
/usr/sbin/rescan-scsi-bus: line 592: [: 1.03: integer expression expected
Host adapter 0 (ahci) found.
Host adapter 1 (ahci) found.
Host adapter 2 (ahci) found.
Host adapter 3 (ahci) found.
Host adapter 4 (ahci) found.
Host adapter 5 (ahci) found.
Host adapter 6 (usb-storage) found.
Host adapter 7 (usb-storage) found.
Host adapter 8 (usb-storage) found.
Host adapter 9 (usb-storage) found.
[cut]

Running bash -x /usr/sbin/rescan-scsi-bus.sh shows where is the problem:

+ test @ = @--help -o @ = @-h -o @ = '@-?'
+ test '!' -d /sys/class/scsi_host/ -a '!' -d /proc/scsi/
+ modprobe sg
+ test -x /usr/bin/sg_inq
++ sg_inq -V
++ cut -d ' ' -f 3
+ sg_version=1.03
+ sg_version=1.03
+ '[' -z 1.03 -o 1.03 -lt 70 ']'
/usr/sbin/rescan-scsi-bus.sh: line 592: [: 1.03: integer expression expected
Comment 1 Rafał Mużyło 2012-02-13 14:06:10 UTC
What's your version of sys-apps/sg3_utils ?
On a semi-related note: it seems rescan-scsi-bus.sh-1.56 is available.
Comment 2 Martin Mokrejš 2012-02-13 16:38:20 UTC
I have sys-apps/sg3_utils-1.33.
Comment 3 Rafał Mużyło 2012-02-13 17:42:59 UTC
In sys-apps/sg3_utils-1.29:
sg_inq -V
Version string: 0.88 20100331
In sys-apps/sg3_utils-1.33:
sg_inq -V
Version string: 1.03 20111113

The lies in 'sg_version=${sg_version##0.}'.

It seems fixed in rescan-scsi-bus.sh-1.56
Comment 4 Jan Matějka (RETIRED) gentoo-dev 2013-08-28 12:48:31 UTC
Fixed in 1.57
commited Tue Aug 27 05:46:18 2013 UTC (31 hours ago) by radhermit