[ltp] T61 Gutsy > Hardy upgrade almost fixed stuff

Theodore Tso linux-thinkpad@linux-thinkpad.org
Mon, 5 May 2008 13:30:00 -0400


On Sun, May 04, 2008 at 10:26:20AM -0400, David A. Desrosiers wrote:
> On Sun, May 4, 2008 at 9:42 AM, Donald P Kong <dpkong@pc.jaring.my> wrote:
> 
> > network-manager should still see wireless networks available if you are
> > connected to wired LAN, unless the wifi card is disabled/module
> > unloaded.
> 
> Network Manager is non-functional in Hardy, just as it was in Gutsy. Avoid
> it if you want functioning wired or wireless networking.

This is the script I use when I need to kick the Network Manager after
it wedges up.  I probably have to use it about every day or two if I'm
wandering about travelling and hitting various access points that use
captive login portals or do something else funky.  It should work on
Debian/Ubuntu systems; you may need to change some pathnames to make
it work on other Linux distributions.

The bottom line is whether or not Network Manager works for you seems
to be mostly a function of which access points you happen to need to
connect into, and if you're travelling it's the worst case.

Occasionally something will get really screwed, and even the script
below won't work.  In practice I know that rebooting will fix the
problem, but so does killing NetworkManager entirely (use this script
with the 'stop' argument) and then manually using iwlist, iwconfig,
and running dhclient manually.  Since the latter is less disruptive
and rebooting, I'll usually fall back to the manual method.  This
usually only happens about once or twice a week while I'm travelling,
and it may be related to suspending and resuming a lot (since I tend
to do that often when I'm at a conference).

So I wouldnt call Network manager totally non-functional, I do have
relatively low expectations of it, and I do find that I need to use
the nm-reset script fairly often when I travel.  (This is using Ubuntu
Gutsy.)

						- Ted

#!/bin/sh

set -eu

case ${1:-restart} in
    'stop')

	if [ -x "/etc/dbus-1/event.d/25NetworkManager" ]; then
		/etc/dbus-1/event.d/25NetworkManager stop
	fi

	if [ -x "/etc/dbus-1/event.d/26NetworkManagerDispatcher" ]; then
		/etc/dbus-1/event.d/26NetworkManagerDispatcher stop
	fi			 

	exit 0;
	;;

    'restart'|'start')
	if [ -x "/etc/init.d/dbus" ]; then
	    RESULT=0
	    invoke-rc.d --disclose-deny dbus force-reload || RESULT=$?

	    if [ ${RESULT} -eq 0 ]; then
		# Only run dbus actions if invoke-rc.d returned 0
		if [ -x "/etc/dbus-1/event.d/25NetworkManager" ]; then
		    /etc/dbus-1/event.d/25NetworkManager restart
		fi

		if [ -x "/etc/dbus-1/event.d/26NetworkManagerDispatcher" ]; then
		    /etc/dbus-1/event.d/26NetworkManagerDispatcher restart
		fi			 
	    fi
	fi
	;;

esac