FS#9425 - [hwd 5.3.2-1] Doesn't escape "." in grep

Attached to Project: Arch Linux
Opened by Kevin Barry (gorn) - Friday, 01 February 2008, 08:09 GMT
Last edited by Thayer Williams (thayer) - Sunday, 01 March 2009, 07:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thayer Williams (thayer)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
In the detectpci() function, $Num is supposed to be set to a unique identifier so that lspci -m | grep $Num will only return one line. However if you have:
$Num == "00:00.0"
(Like I did running Arch i686 as a client under VMWare Workstation V6.02 x64)
Then that will also match:
"1000:0030" because it contains 00:00.0 where . is anything.
(Having multiple lines returned causes odd problems with an invalid file being generating and odd error messages)

We actually want $Num to be "00:00\.0" so that it only matches the proper case.
(Additionally it might make sense to require it be at the start of a line)

I fixed this by changing:
Num=`echo $LINE`
to
Num=`echo $LINE | sed 's/\./\\\./g'`

on line number 82




Additional info:
* hwd-5.3.2-1


Steps to reproduce:

Have hardware that causes lspci to output multiple lines when running grep with a unescaped period
   hwd.diff (0.4 KiB)
This task depends upon

Closed by  Thayer Williams (thayer)
Sunday, 01 March 2009, 07:37 GMT
Reason for closing:  Fixed
Comment by Greg (dolby) - Sunday, 04 May 2008, 18:51 GMT
this should be assigned to rasat as well
Comment by Aaron Griffin (phrakture) - Wednesday, 07 May 2008, 22:59 GMT
This is an upstream bug. hwd is not an Arch specific tool
Comment by Damir Perisa (damir.perisa) - Thursday, 08 May 2008, 04:26 GMT
i cannot reach rasat by email - anybody knows where he is and if he has another email address?
Comment by Greg (dolby) - Thursday, 19 June 2008, 20:08 GMT
does hwd 5.3.4-1 fix this?
Comment by Rasat (rasat) - Friday, 05 December 2008, 16:05 GMT
Sorry, I didn't read this bug report. I will fix in next update 6.0

Loading...