Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Run a custom script after USB mount
@ 2015-04-17 15:21 Santhosh Ramani
  2015-04-17 16:23 ` Lionel Orry
  0 siblings, 1 reply; 10+ messages in thread
From: Santhosh Ramani @ 2015-04-17 15:21 UTC (permalink / raw)
  To: buildroot

Hello Everyone,

I am having some trouble with udev and rules.d. The buildroot system
automatically mounts any USB memory stick at the location /media/usb0. (I
have only USB host port). I would like to execute a script every time a USB
memory stick is inserted.

I added a custom rule in rules.d - I named it *z*usbdetect.rules (z so that
it runs at the very end, since I want it to run after usbmount.rules in
/lib/udev/rules.d has finished executing)

The content of the rules file are as follows:

KERNEL=="sd*", ATTRS{mode}=="a_host", ATTRS{serial}=="musb-hdrc.0.auto",
ATTRS{product}=="MUSB HDRC host driver", RUN+="/etc/hcc/usb-detected"

I have double checked that my script has execute permissions and I can run
it by hand. Am I missing something? Can you please point me in the right
direction?

Thank you for your help.
Regards

Santhosh

-- 
Greater the Difficulty....Sweeter is the Victory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150417/914a44d6/attachment.html>

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

end of thread, other threads:[~2015-04-29  3:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 15:21 [Buildroot] Run a custom script after USB mount Santhosh Ramani
2015-04-17 16:23 ` Lionel Orry
2015-04-17 16:37   ` Santhosh Ramani
2015-04-18 12:36     ` Thomas Petazzoni
2015-04-23  3:02       ` Santhosh Ramani
2015-04-23  3:44         ` Santhosh Ramani
2015-04-23 19:56         ` Arnout Vandecappelle
2015-04-23 23:04           ` Santhosh Ramani
2015-04-28 18:51             ` Arnout Vandecappelle
2015-04-29  3:01               ` Santhosh Ramani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox