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.
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.
That should have read "test being run" ;) And the line number the error gave was the line number in /etc/hotplug/hotplug.functions btw
Fixed. I thought there must have been some quotes missing somewhere but my brain was not functional at the time. Thanks.
I had the same problem; The patch fixes it for me as well.
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
Fixed in hotplug-20030501-r1.ebuild. Enjoy.
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.