>The way we do that is to have a process running before the device is
>plugged in. That grabs the device and stops it mounting in the
>first place. I'm not sure of the details of how that works, but from
>a user point of view they run the updater and it says "Please plug
>in <device name>".
>We let the user deal with the messy aspects of unmounting etc.
That's not quite right, the updater will attempt to unmount the
device if it is already mounted. However that can fail, and it then
asks the user to fix the problem.