Subversion Repositories livecd

Rev

Rev 148 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 148 Rev 149
Line 474... Line 474...
474
# network devices found ?
474
# network devices found ?
475
#
475
#
476
found_nic()
476
found_nic()
477
{
477
{
478
    found="1"
478
    found="1"
-
 
479
    PRINTK=`cat /proc/sys/kernel/printk`
-
 
480
    echo "0" >/proc/sys/kernel/printk
479
    for iface in eth0 eth1 eth2 eth3 eth4 eth5; do
481
    for iface in eth0 eth1 eth2 eth3 eth4 eth5; do
480
	# nic already found ?
482
	# nic already found ?
481
	echo $FOUND_IFACE | grep -q $iface 
483
	echo $FOUND_IFACE | grep -q $iface 
482
	if [ $? -ne 0 ]; then
484
	if [ $? -ne 0 ]; then
483
	    ifconfig $iface > /dev/null 2>&1
485
	    ifconfig $iface > /dev/null 2>&1
Line 485... Line 487...
485
		FOUND_IFACE="$FOUND_IFACE $iface"
487
		FOUND_IFACE="$FOUND_IFACE $iface"
486
		found="0"
488
		found="0"
487
	    fi
489
	    fi
488
	fi
490
	fi
489
    done
491
    done
-
 
492
    echo "$PRINTK" >/proc/sys/kernel/printk
490
    return $found
493
    return $found
491
}
494
}
492
 
495
 
493
# 1. load network driver defined by kernel parameter nic
496
# 1. load network driver defined by kernel parameter nic
494
#
497
#
Line 575... Line 578...
575
    # mii maybe need by NIC driver
578
    # mii maybe need by NIC driver
576
    modprobe_module mii
579
    modprobe_module mii
577
 
580
 
578
    FOUND_IFACE=""
581
    FOUND_IFACE=""
579
    load_network_module_nic
582
    load_network_module_nic
580
    found_nic        || load_network_module_auto
583
    found_nic          || load_network_module_auto
581
    [ "$FOUND_IFACE" ] || load_network_module_pcitable
584
    [ "$FOUND_IFACE" ] || load_network_module_pcitable
582
    [ "$FOUND_IFACE" ] || load_network_module_ask
585
    [ "$FOUND_IFACE" ] || load_network_module_ask
583
 
586
 
584
    # remove mii, if not needed
587
    # remove mii, if not needed
585
    rmmod mii > /dev/null 2>&1
588
    rmmod mii > /dev/null 2>&1
Line 604... Line 607...
604
	    [ $? -eq 0 ] && return
607
	    [ $? -eq 0 ] && return
605
	    echo "ERROR: couldn't get DHCP lease on $iface."
608
	    echo "ERROR: couldn't get DHCP lease on $iface."
606
	fi
609
	fi
607
    done
610
    done
608
}
611
}
609
 
-