linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev + modprobe
@ 2007-07-29 15:07 Oliver Martin
  2007-07-29 19:23 ` Kay Sievers
  2007-07-29 22:08 ` Oliver Martin
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Martin @ 2007-07-29 15:07 UTC (permalink / raw)
  To: linux-hotplug

(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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: udev + modprobe
  2007-07-29 15:07 udev + modprobe Oliver Martin
@ 2007-07-29 19:23 ` Kay Sievers
  2007-07-29 22:08 ` Oliver Martin
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2007-07-29 19:23 UTC (permalink / raw)
  To: linux-hotplug

On 7/29/07, Oliver Martin <spam@dodgit.com> wrote:
> (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!
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: udev + modprobe
  2007-07-29 15:07 udev + modprobe Oliver Martin
  2007-07-29 19:23 ` Kay Sievers
@ 2007-07-29 22:08 ` Oliver Martin
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Martin @ 2007-07-29 22:08 UTC (permalink / raw)
  To: linux-hotplug

Kay Sievers schrieb:
> 
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-29 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 15:07 udev + modprobe Oliver Martin
2007-07-29 19:23 ` Kay Sievers
2007-07-29 22:08 ` Oliver Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).