Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20846 - Hotplug 20030501 script errors
Summary: Hotplug 20030501 script errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Zach Welch (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-12 09:10 UTC by Paul Slinski
Modified: 2003-06-07 09:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the unary operator error (hotplug.functions.patch,302 bytes, patch)
2003-05-12 19:31 UTC, rob holland (RETIRED)
Details | Diff
A better patch to fix the underlying bug (hotplug.functions.diff,703 bytes, patch)
2003-06-07 09:30 UTC, Ian Abbott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slinski 2003-05-12 09:10:53 UTC
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 rob holland (RETIRED) gentoo-dev 2003-05-12 19:31:09 UTC
Created attachment 11861 [details, diff]
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 rob holland (RETIRED) gentoo-dev 2003-05-12 19:32:23 UTC
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 Paul Slinski 2003-05-14 09:14:42 UTC
Fixed. I thought there must have been some quotes missing somewhere but my brain was not functional at the time.

Thanks.
Comment 4 Dan Noe 2003-05-15 11:12:22 UTC
I had the same problem; The patch fixes it for me as well.
Comment 5 Dave Nellans 2003-05-27 11:23:18 UTC
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 Zach Welch (RETIRED) gentoo-dev 2003-05-27 18:38:27 UTC
Fixed in hotplug-20030501-r1.ebuild.  Enjoy.
Comment 7 Ian Abbott 2003-06-07 09:30:35 UTC
Created attachment 12913 [details, diff]
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.