<p dir="ltr">Will '/usr/bin/perl /lib/libexec/usb-load' even work?</p>
<p dir="ltr">-Erik-</p>
<div class="gmail_quote">On Nov 21, 2013 5:41 PM, "Chris Fowler" <<a href="mailto:cfowler@outpostsentinel.com">cfowler@outpostsentinel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
I'm writing a udev rule that I want to run only when something is
plugged into a USB port<br>
<br>
<b><small><font face="Courier New, Courier, monospace">ACTION!="add",
GOTO="end01"<br>
<br>
BUS=="usb",RUN+="/lib/libexec/usb-load %b %s{idVendor}
%s{idProduct}", $attr{idVendor}, $s{idProduct}<br>
<br>
SUBSYSTEM!="net", BUS!="usb", GOTO="end01"<br>
<br>
SYSFS{idProduct}=="9700", SYSFS{idVendor}=="0fe6", <br>
KERNEL=="*", RUN+="/sbin/modprobe dm9601"<br>
<br>
LABEL="end01"<br>
</font></small></b><br>
<br>
My goal is to load the necessary modules on this system. The
problem is that the perl script 'usb-load' is not executed. I can
easily remove the BUS=="usb" part and have it run on all devices and
it can look at devpath to see USB. The problem is that this would
be cpu intensive. I want it to execute whenever a usb-serial,
usb-modem, or usb-storage device is attached. In some cases the
kernel does not know that a certain vId and pId is attached to a
driver and I have to load it myself. You see that example where I
am having to load the dm9601 driver for a usb-net device. I see
the same for usb-storage. Some USB sticks the kernel loads
usb-storage for some it does not know to. If I capture the vId and
pId I can then look it up and load up the correct one.<br>
<br>
Chris<br>
<br>
<br>
<br>
<br>
<br>
</div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div>