[ltp] Re: What are people using for Dock/Undocking scripts for
their X60/61's?
Theodore Tso
linux-thinkpad@linux-thinkpad.org
Sat, 7 Mar 2009 00:21:41 -0500
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.
- Ted