[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does sungem support MII?

On Sat, Feb 08, 2003 at 05:31:14PM +0100, ?ukasz Studzi?ski wrote:
> I would like to use laptop-net package on ibook3 (Nov2002), but I am not
> quite sure if its NIC (which is sungem) support MII (Media Independent
> Interface). I had some trouble with network when a driver was configured
> as a module.
> I move the computer to many locations, so since suspending works with no
> problem now I would like to automatize network configuring. Maybe some
> of you have some experience on this subject?

I do this in /etc/power/pwrctl-local, by testing for the network when
the laptop wakes up:

function is_network_up () {
    # get default gateway machine
    gateway=`ip route list | awk '/^default via [0-9.]+/{print $3}'`
    if [ -n "$gateway" ] ; then
        # ping for a maximum of $timeout s, until at least one packet is returned
        ping -w${timeout} -c1 -n $gateway > /dev/null
        return $?
        return 1

case $1 in
        if ! is_network_up ; then
            ifdown eth0 ppp0
            ifup eth0 ppp0

Then, I do magic in /etc/network/interfaces (which controls how ifup and
ifdown do their stuff). I use guessnet to choose the right network,
which can then be mapped to how to set it up (using dhcp, static IP,

This works quite well for me.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/

Reply to: