Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167742 - Generic dock status detection for all (acpi) hardware
Summary: Generic dock status detection for all (acpi) hardware
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-20 12:13 UTC by Antti Mäkelä
Modified: 2007-07-12 14:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Docking detection script - place in /lib/rcscripts/net (dock.sh,606 bytes, text/plain)
2007-02-20 12:14 UTC, Antti Mäkelä
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Mäkelä 2007-02-20 12:13:23 UTC
Hi,

  I have recently started using the generic ACPI dock driver that has been in the recent kernels instead if ibm_acpi dock driver. Anyway, as such, I've updated the script to use that generic ACPI module instead of ibm-specific ones. Now it's probably usable to a much wider audience. 

  The original purpose of the script was to accommodate for cases where network configuration changes depending on location - for myself, I have static IP-setup when docked at my office desk and I use DHCP elsewhere. 

  Anyway, this new script now requires the use of ACPI_DOCK driver in kernel and checks the status from the sysfs instead of /proc/acpi/ibm.
Comment 1 Antti Mäkelä 2007-02-20 12:14:37 UTC
Created attachment 110726 [details]
Docking detection script - place in /lib/rcscripts/net

Configuration in /etc/init.d/net as

config_eth0_docked=(...)
config_eth0=(...) // for undocked
Comment 2 Roy Marples (RETIRED) gentoo-dev 2007-04-05 10:55:27 UTC
Nice script :)

Does docking work with ifplugd/netplugd?

Just curious here, as that combo + arping maybe a better solution than just "am i docked" or not.
Comment 3 Antti Mäkelä 2007-04-06 17:27:21 UTC
(In reply to comment #2)
> Nice script :)
> 
> Does docking work with ifplugd/netplugd?
> 
> Just curious here, as that combo + arping maybe a better solution than just "am
> i docked" or not.

  It does at least with ifplugd and my Thinkpad. 

  In Thinkpads, the dock's Ethernet port appears as same as the laptops own - so theoretically it won't switch configurations if you have a cable plugged in to your laptop port and dock the computer - but not seeing how this could happen :)

  Other than that, ifplugd just sees an interface come up when you dock and when it calls the net.xxx to go up the docking status is already available via sysfs - so it's pretty transparent. 
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-07-12 14:14:02 UTC
I've added this to the preup code example section instead - I think a module by itself is overkill really.