Skip to contentSkip to conversation

usb.usermap script processing doesn't work for me

DISCUSSION Reinhold May 2 participants 2 messages Nov 19, 2002 – Nov 21, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I'm not sure if I've understood the hotplug scripts correctly and as I'm fairly new to linux scripts please correct me if I'm wrong.

When I tried to install the Alcatel Speedtouch modem kernel drivers according to Johan Verrept's HowTo
(http://linux-usb.sourceforge.net/SpeedTouch/howto.html) I couldn't get it to work.

The 'driver' is a simple script (loading a kernel module on its own) in '/etc/hotplug/usb' along with an entry in '/etc/hotplug/usb.usermap' comprising the name of the script and vendor and product id.

As I understand the hotplug scripts they should eventually read the entry in 'usb.usermap', compare the module name with the available kernel module names and, even if no kernel module with that name exists, look in the corresponding subdirectory for a script with that module name to execute.

That didn't work for me and I tracked my problem down to an entry in '/etc/hotplug/hotplug.functions' and changed it according to this:

@@ -119,7 +119,7 @@
fi

# do it with just shell scripts
- if [ "$LISTER" = "" ]; then
+ if [ "$DRIVERS" = "" ]; then
${TYPE}_map_modules < $FILENAME
fi

As '$LISTER' is the command to check for corresponding kernel modules and '${TYPE}_map_modules < $FILENAME' would save the information from e. g. 'usb.usermap', it doesn't make any sense to me. Checking if '$DRIVERS' has already been set by '$LISTER' commands above that position does make far more sense to me and in my case it worked.

I hope you agree to me that this was not the intended behaviour of the script and you agree it has to be changed.

Reinhold

Signature · 13 lines
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw
Quoted 1 line · Reinhold May

Hi,

Welcome!

Quoted 13 lines

That didn't work for me and I tracked my problem down to an entry in '/etc/hotplug/hotplug.functions' and changed it according to this:

(quoted diff) +1 -1
@@ -119,7 +119,7 @@
     fi
 
     # do it with just shell scripts
-    if [ "$LISTER" = "" ]; then
+    if [ "$DRIVERS" = "" ]; then
 	${TYPE}_map_modules < $FILENAME
     fi
 
Quoted 6 lines

As '$LISTER' is the command to check for corresponding kernel modules and '${TYPE}_map_modules < $FILENAME' would save the information from e. g. 'usb.usermap', it doesn't make any sense to me. Checking if '$DRIVERS' has already been set by '$LISTER' commands above that position does make far more sense to me and in my case it worked.

Actually the expectation is that the binary lister and the shell script version are _identical_ except that the binary one can recognize multi-interface devices ... so it would notice $DRIVERS that the shell script wouldn't, never the other way around.

Seems that's not the case ... like maybe "usbmodules" doesn't understand about lines with comments, that sounds familiar.

I'll merge your patch in with some other things I've got queued, mostly for some intelligence about 2.5 hotplug.

Quoted 2 lines

I hope you agree to me that this was not the intended behaviour of the script and you agree it has to be changed.

The intended behavior is that it works and creates more happy penguins! Merging your patch creates two more. World Domination, step by step ... :)

- Dave

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel