Subversion Repositories livecd

Rev

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

Rev 241 Rev 246
Line 579... Line 579...
579
load_network_module_auto()
579
load_network_module_auto()
580
{
580
{
581
    echolog "auto-detection of network driver ..."
581
    echolog "auto-detection of network driver ..."
582
    FOUND_NICS=""
582
    FOUND_NICS=""
583
    KERNEL="`uname -r`"
583
    KERNEL="`uname -r`"
584
    NETDRIVERS="`find /lib/modules/$KERNEL/kernel/drivers/net | grep -v mii | grep .ko | cut -d"/" -f8 | cut -d"." -f1 | uniq`"
584
    NETDRIVERS="`find /lib/modules/$KERNEL/kernel/drivers/net | grep -v mii | grep -v 8021q | grep .ko | cut -d"/" -f8 | cut -d"." -f1 | uniq`"
585
    for driver in $NETDRIVERS; do
585
    for driver in $NETDRIVERS; do
586
       	modprobe_module $driver > /dev/null 2>&1
586
       	modprobe_module $driver > /dev/null 2>&1
587
	found_nic
587
	found_nic
588
	if [ $? -eq 0 ]; then
588
	if [ $? -eq 0 ]; then
589
	    echolog "found network card $driver"
589
	    echolog "found network card $driver"
Line 644... Line 644...
644
#
644
#
645
load_network_modules()
645
load_network_modules()
646
{
646
{
647
    echolog "load network modules"
647
    echolog "load network modules"
648
 
648
 
649
    # mii maybe need by NIC driver
649
    # mii and 8021q maybe need by NIC driver
-
 
650
    modprobe_module 8021q
650
    modprobe_module mii
651
    modprobe_module mii
651
 
652
 
652
    FOUND_IFACE=""
653
    FOUND_IFACE=""
653
    load_network_module_nic
654
    load_network_module_nic
654
    found_nic          || load_network_module_auto
655
    found_nic          || load_network_module_auto
655
    [ "$FOUND_IFACE" ] || load_network_module_pcitable
656
    [ "$FOUND_IFACE" ] || load_network_module_pcitable
656
    [ "$FOUND_IFACE" ] || load_network_module_ask
657
    [ "$FOUND_IFACE" ] || load_network_module_ask
657
 
658
 
658
    # remove mii, if not needed
659
    # remove mii and 8021q, if not needed
-
 
660
    rmmod 8021q > /dev/null 2>&1
659
    rmmod mii > /dev/null 2>&1
661
    rmmod mii   > /dev/null 2>&1
660
}
662
}
661
 
663
 
662
 
664
 
663
# get DHCP lease
665
# get DHCP lease
664
# Urs Beyerle
666
# Urs Beyerle