Hi, 

Now the long answer.
I'm using a extra service (in boot) in witch you can choose with grub
and i thin lilo also witch kind of network you will start, with thoose
scripts you can change everything you can image.
Internal network, wireless, no netwerk and so on even the firwall
settings.

How it works:
/etc/init.d/netconfig 

this file is placed in the boot runlevel (rc-update add netconfig boot)
at boot time this script read the value of NetConfig=xxx in grub/lilo
and performs the right action. In my case eth0 or eth1. It just places a
symbolic link to  my /et/runlevels/default/net.eth0 so  eth0 start or
not. 
If you have any questions about it just send me a mail.

HTH

Patrick


-- 
Insufficient facts always invite danger.
-- Spock, "Space Seed", stardate 3141.9

PGP Key: http://users.pandora.be/rivendell/marquetp.gpg
Fingerprint = 2792 057F C445 9486 F932 3AEA D3A3 1B0C 1059 273B
ICQ# 316932703 
Registered Linux User #44550
http://counter.li.org
#!/sbin/runscript
#
# netconfig
#
# Written by:  Sean C. Higgins

RunLevelPath="/etc/runlevels/default"

depend() {
        before net.*
}

start() {
        ebegin "Starting netconfig"
         case $NetConfig in 
          eth0)
            ebegin "  Switching to: $NetConfig" 
            ln -s /etc/conf.d/net-eth0 $RunLevelPath"/net.eth0";;
          eth1)
            ebegin "  Switching to: $NetConfig"
            if [[ -e $RunLevelPath"/net.eth0" ]]; then
                rm -f $RunLevelPath"/net.eth0"
            fi
         esac
}

stop() {
        ebegin "Stopping netconfig"
        rm $RunLevelPath"/net.eth0"
        eend $? "Error removing "$RunLevelPath"/net.eth0"
}
default 5
timeout 10
splashimage=(hd0,4)/boot/grub/splash.xpm.gz

title=Gentoo - Ingebouwd
root (hd0,4)
kernel (hd0,4)/boot/kernel-2.4.20-gentoo-r7 root=/dev/hda7 NetConfig=eth0
initrc (hd0,0)/boot/initrd-2.4.20-gentoo-r7

title=Gentoo - Wireless
root (hd0,4)
kernel (hd0,4)/boot/kernel-2.4.20-gentoo-r7 root=/dev/hda7 NetConfig=eth1
initrc (hd0,0)/boot/initrd-2.4.20-gentoo-r7


title=Windows XP
root (hd0,0)
chainloader (hd0,0)+1

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to