Previously, I asked [this question](https://unix.stackexchange.com/q/1759/1207) about how to suspend Linux after a set amount of time.

I would like to ask a similar question. Supposing I have a USB device attached to my system (OS = Fedora 13), are there commands that can:

* detach the USB device and,
* after detaching it, shutdown the system after a specified interval.

To be more precise, detaching means a command that safely removes the device.