Bug 20846 - Hotplug 20030501 script errors
Bug#: 20846 Product:  Gentoo Linux Version: 1.4_rc1 Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: zwelch@gentoo.org Reported By: deviantgeek@gmail.com
Component: Applications
URL: 
Summary: Hotplug 20030501 script errors
Keywords:  
Status Whiteboard: 
Opened: 2003-05-12 09:10 0000
Description:   Opened: 2003-05-12 09:10 0000
When hotplug starts up it errors out towards the end of it's run. although it
completes with a successful status and it seems to work fine, there appears to
be somthing missing from the script (maybe quotes?).

Reproducible: Always
Steps to Reproduce:
1. Emerge hotplug-20030501
2. Start hotplug
3.

Actual Results:  
The following errors are echoed to the console (edited for space):

/etc/hotplug/pci.agent: line 167: [: =: unary operator expected
/etc/hotplug/usb.agent: line 167: [: =: unary operator expected


Expected Results:  
No errors.

Not sure where the error lies. Line 167 on usb.agent is a comment and in
pci.agent, the script does not appear to be wrong.

------- Comment #1 From rob holland (RETIRED) 2003-05-12 19:31:09 0000 -------
Created an attachment (id=11861) [details]
Fixes the unary operator error

The problem was caused by a text being run on an unquoted variable in
/etc/hotplug/hotplug.functions

The patch fixes that specific error, there may be more of those. I haven't
checked.

------- Comment #2 From rob holland (RETIRED) 2003-05-12 19:32:23 0000 -------
That should have read "test being run" ;) And the line number the error gave
was the line number in /etc/hotplug/hotplug.functions btw

------- Comment #3 From Paul Slinski 2003-05-14 09:14:42 0000 -------
Fixed. I thought there must have been some quotes missing somewhere but my
brain was not functional at the time.

Thanks.

------- Comment #4 From Dan Noe 2003-05-15 11:12:22 0000 -------
I had the same problem; The patch fixes it for me as well.

------- Comment #5 From Dave Nellans 2003-05-27 11:23:18 0000 -------
I'll thirdly confirm the bug and that this patch fixes it sucessfully.  Can
someone commit this to cvs for the next revision of hotplug?

dave

------- Comment #6 From Zach Welch (RETIRED) 2003-05-27 18:38:27 0000 -------
Fixed in hotplug-20030501-r1.ebuild.  Enjoy.

------- Comment #7 From Ian Abbott 2003-06-07 09:30:35 0000 -------
Created an attachment (id=12913) [details]
A better patch to fix the underlying bug

The previous patch merely hides the real bug, which is that the LOADED variable
ought to be 
set to a value each time around the loop.  I mentioned this yesterday on 
linux-hotplug-devel@lists.sourceforge.net along with the attached patch to fix
the 
problem, and that has now been merged.