[ltp] Re: What are people using for Dock/Undocking scripts for their X60/61's?

Karsten König linux-thinkpad@linux-thinkpad.org
Sat, 7 Mar 2009 01:33:04 +0100


Am Donnerstag 05 März 2009 17:08:44 schrieb Theodore Tso:
> > I recently did this tutorial for t61 and t61p. Might help...
> > http://ubuntuforums.org/showthread.php?t=1076486
>
> Am I right?  It *looks* like your scripts run after the laptop is
> undocked.  What I'm trying to figure out is how to place a hook
> *before* the laptop is undocked, and then if it turns out the
> filesystem can't be unmounted (because it's busy, for example), to
> refuse the undock.

The undock event that udev generates happens on pressing the undock button, 
afterwards your system is registered as undocked while it still is in the 
dock. Undocking the system afterwards just pulls out powercord and whatever 
might still be connected (ethernet for example).
(You can track the events with 'udevadm monitor')

> That is, I want the script to return an error code, and then for the
> system not to proceed with the undock operation.

Windows blinks the dock led until it is safe to remove, no idea if that is 
currently possible with linux (accessing these leds that is)



Karsten