execute script after (auto)mounting external device
Tom H
tomh0665 at gmail.com
Mon Dec 7 09:11:52 UTC 2009
>> Good thread thanks. Although I would try to create a rule without
>> "ACTION=="add"" first and not prepend "ACTION=="add"" if it is not
>> needed.
>> It shows that my earlier suggestion of ""SUBSYSTEM=="block"" was
>> incorrect. Sorry (I was at the end of an 18.5-hour shift after all!).
> No need to apologize, been there ;-). Careful with removing the
> "ACTION=="add"", I think this is letting the system know what to wait
> and look for... ok kernel, when something is added from the
> usb_subsystem that looks like this and made by these guys, then go ahead
> and execute this. So unless the system defaults to watching for an
> "add" action it may kill a critical link. This is part of the stuff I
> am still learning so hopefully someone else can explain why or why not
> better than I. Let us know how it works.
I have written rules without "ACTION=="add"". AFAIK "ACTION=="add"" is
to add a device so unless the falsh drive is not auto-detected through
the default udev rules, the OP should not need to prepend
"ACTION=="add"" to his script running rule.
More information about the ubuntu-users
mailing list