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

Karsten König linux-thinkpad@linux-thinkpad.org
Tue, 10 Mar 2009 01:00:09 +0100


Am Samstag 07 März 2009 06:21:41 schrieb Theodore Tso:
> On Sat, Mar 07, 2009 at 01:33:04AM +0100, Karsten König wrote:
> > > 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')
>
> Um, no.  I *have* tracked things using udevadm monitor, dbus-monitor,
> and lshal --monitor, and the problem is that right after you push the
> button, it disconnects the hard drive right away.  It is true that it
> doesn't disconnect the ethernet port, yes --- but that's because it is
> just a matter of routing wires.  But anything with an electronic
> interface, such as the UltraBay hard drive, or the USB hubs, etc., are
> all disengaged after pressing the undock button.

Ouch, that happens when you track the undock event with nothing connected to 
the dock except monitor and ethernet + ps/2 mouse and some usb sticks you 
don't mind, I didn't had anything important connected/mounted so I thought is 
has been taken care of instead of ripped out.
Sorry for the confusion


Karsten