execute script after (auto)mounting external device

Tom H tomh0665 at gmail.com
Sat Dec 5 01:54:59 UTC 2009


>> I have been looking for a GUI for devicekit-disks but no luck.
>> At the cli, there is devkit-disks.

> Neat (I've saved the bookmark!), but not what I'm looking for (I think).

> devkit-disks is concerned with hardware.

> I am looking for a "hook" *after* a specific device has been mounted.
>
> My use-case: The specific device is an encrypted partition on a prtable
> usb-stick. Once I mount and decrypt that volume, I would like to sync
> certain parts of that partition using a script. Can I do that using
> devkit-disks? From scanning the devkit man page I have the impression,
> that devkit has a different focus...

I thought that you would be able to grep for your removable's uuid or
label and then run whatever script you wanted. The script would have
to be run manually though; not quite what I understand that you want.
The only other option that I can think of is to write a udev rule for
your device to run a script.




More information about the ubuntu-users mailing list