--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Outdated check for version of sg_inq ("/sbin/rescan-scsi-bus: line 592: [: 1.03...")
- From: Claudius Hubig <debian_1302@chubig.net>
- Date: Tue, 19 Feb 2013 21:39:58 +0000
- Message-id: <20130219213958.7368.40345.reportbug@ares.home.chubig.net>
Package: scsitools
Version: 0.12-2.1
Severity: minor
Dear Eric,
at the moment, the file /sbin/rescan-scsi-bus contains the following
code:
# nl -ba /sbin/rescan-scsi-bus | egrep -B 4 -A 5 '^[[:space:]]*592'
588 if test -x /usr/bin/sg_inq; then
589 sg_version=$(sg_inq -V 2>&1 | cut -d " " -f 3)
590 sg_version=${sg_version##0.}
591 #echo "\"$sg_version\""
592 if [ -z "$sg_version" -o "$sg_version" -lt 70 ] ; then
593 sg_len_arg="-36"
594 else
595 sg_len_arg="--len=36"
596 fi
597 fi
which apparently checks for a version greater than 0.70 of
sg_inq. However, sg_ing as of Wheezy reports:
# sg_inq -V
Version string: 1.03 20111113
This causes rescan-scsi-bus to print the following (non-fatal) error
message:
# rescan-scsi-bus 4
/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.
Scanning SCSI subsystem for new devices
Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 4 0 0 0 ...
OLD: Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: External Disk 0 Rev: 1.15
Type: Direct-Access ANSI SCSI revision: 05
0 new device(s) found.
0 device(s) removed.
Everything works fine, so this is just FYI :)
Thanks for your great work,
Claudius
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.7.1.a2017.3 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages scsitools depends on:
ii libc6 2.13-38
ii sg3-utils 1.33-1
ii util-linux 2.20.1-5.3
Versions of packages scsitools recommends:
ii tk8.4 [wish] 8.4.19-5
ii tk8.5 [wish] 8.5.11-2
scsitools suggests no packages.
-- no debconf information
--- End Message ---