syntax error in load_drivers, LOADED unset
PATCH 1/1 syntax error in load_drivers, LOADED unset
This avoids the ' if [ = false ] ' syntax error:
I have seen it also in the debian patch.
Index: etc/hotplug/hotplug.functions
=================================RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v retrieving revision 1.19
hotplug/hotplug.functions 9 Jun 2003 11:39:07 -0000 renamed from hotplug/hotplug.functions 6 Jun 2003 18:26:57 -0000 1.19 +1 -1
@@ -171,7 +171,7 @@ LOADED=true fi - if [ $LOADED = false ]; then + if [ "$LOADED" = false ]; then mesg "missing kernel or user mode driver $MODULE " fi done
Signature · 11 lines
USB is for mice, FireWire is for men! ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Olaf Hering
This avoids the ' if [ = false ] ' syntax error:
I have seen it also in the debian patch.
Not needed with that other fix to initialize LOADED at the top of the loop ...
Quoted 7 lines
Index: etc/hotplug/hotplug.functions
=================================> RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v retrieving revision 1.19
diff -u -r1.19 hotplug.functions
hotplug/hotplug.functions 9 Jun 2003 11:39:07 -0000 line 177
Quoted 8 lines
hotplug/hotplug.functions 9 Jun 2003 11:39:07 -0000 renamed from hotplug/hotplug.functions 6 Jun 2003 18:26:57 -0000 1.19 +1
-1@@ -171,7 +171,7 @@ LOADED=true fi - if [ $LOADED = false ]; then + if [ "$LOADED" = false ]; then mesg "missing kernel or user mode driver $MODULE " fi done
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · David Brownell
Quoted 2 lines · Olaf Hering
This avoids the ' if [ = false ] ' syntax error:
I have seen it also in the debian patch.Not needed with that other fix to initialize LOADED at the top of the loop ...
you are right, I forgot to apply the cvs patch to my tree.
Signature · 11 lines
USB is for mice, FireWire is for men! ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · David Brownell
Quoted 2 lines · Olaf Hering
This avoids the ' if [ = false ] ' syntax error:
I have seen it also in the debian patch.Not needed with that other fix to initialize LOADED at the top of the loop ...
I believe the current code is buggy.
We set LOADED to false
'lsmod | grep -q "^$MODULE "' will trigger the blacklist check and the modprobe.
If the driver is already loaded because another device triggered a load earlier, or because it was loaded for other reasons, then LOADED will remain 'false'.
LOADED will eventually become true if a usermode helper $TYPE/$MODULE exists. If none exists, this message is triggered, which is misleading:
mesg "missing kernel or user mode driver $MODULE "
Was something like this the intention?
...
for MODULE in $DRIVERS
do
# maybe driver modules need loading LOADEDúlse
lsmod | grep -q "^$MODULE " && LOADED=true if [ $LOADED = false ] ; then
...
Gruss Olaf
Signature · 11 lines
USB is for mice, FireWire is for men! ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Olaf Hering
If the driver is already loaded because another device triggered a load earlier, or because it was loaded for other reasons, then LOADED will remain 'false'.
LOADED will eventually become true if a usermode helper $TYPE/$MODULE exists. If none exists, this message is triggered, which is misleading:
mesg "missing kernel or user mode driver $MODULE "
No message should be emitted if there was no
per-device setup script, unless it also failed
to load the kernel module ... or something like
that.
The logic there could stand improvement.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel