# udev external HD unmount

## mwallace

Hi.

I'm trying to make udev run a script when a user unmounts an external HD. However, the "ACTION==remove" rule I thought would be useful for that is in fact not, as it only comes into play when the device is getting unplugged. I need udev to react on an unmount event. How can I archieve that?

Thanks

Chris

----------

## truc

I don't know of any way for the unmount call to trigger something, but, you can still either make a custom umount command which will appear before the real umount binary in your $PATH

what are you exactly trying to do?

I'm personnally using a modified version of the script available here ( http://elliotli.blogspot.com/2009/01/safely-remove-usb-hard-drive-in-linux.html ), and specify it as the unmount command in my file manager configuration is actually enough.

A similar trick may be enough for you too?

----------

## mwallace

Hi,

I am actually using the same script (with some changes to support firewire devices, too), but your suggestions don't appeal to me  :Wink:  I don't want to mess with mount directly, but am looking for a way to let HAL do it, as it comes out that udev is not able to react on unmount events. Well, I have currently some discussion on the linuxhotplug ML. We will see...

Cheers

Chris

----------

