Both pcmcia and apm support some level of these hooks. However there is no way for you to be prompted. They run as daemons, and as such have no access to the user. Look into pcmcia's script hooks. Should be helpful. Also there is a program named divine which may or may not help you. Is not packaged yet because I am waiting for a lib it depends on to make it thru Incoming.