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.
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
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.
(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.
I've added this to the preup code example section instead - I think a module by itself is overkill really.