udev + modprobe
(seems my last message didn't get through...)
Hello,
I am trying to make udev load required modules as devices are plugged in, so I wrote this rule:
ATTR{modalias}="?*", ACTION="add", RUN+="/sbin/modprobe $env{MODALIAS}"
However, when I plug in a USB drive, nothing happens. But now comes the weird bit: If I save MODALIAS to a file (with the same rule, only a modified command) and later run modprobe manually, it loads usb-storage just fine!
This happens with udev-106 and Busybox 1.4.2, as installed by ptxdist (an embedded userland builder). udev itself is working fine and creates the correct device nodes if the modules are already loaded. Any ideas what my problem could be?
Thanks,
Oliver
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Oliver Martin
(seems my last message didn't get through...)
I am trying to make udev load required modules as devices are plugged in, so I wrote this rule:
ATTR{modalias}="?*", ACTION="add", RUN+="/sbin/modprobe $env{MODALIAS}"
However, when I plug in a USB drive, nothing happens. But now comes the weird bit: If I save MODALIAS to a file (with the same rule, only a modified command) and later run modprobe manually, it loads usb-storage just fine!
Quoted 4 lines
This happens with udev-106 and Busybox 1.4.2, as installed by ptxdist (an embedded userland builder). udev itself is working fine and creates the correct device nodes if the modules are already loaded. Any ideas what my problem could be?
No idea, what's going wrong, but there is no need to read the file, when you pass the value of the environment anyway. Just check for:
ENV{MODALIAS}="?*", ...
Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Kay Sievers
No idea, what's going wrong, but there is no need to read the file, when you pass the value of the environment anyway. Just check for:
ENV{MODALIAS}="?*", ...
Thanks for your reply, I just solved it. It was a problem with the Busybox version of modprobe. With the one from module-init-tools it works.
Oliver
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel