Gentoo Archives: gentoo-dev

From: Todd Punderson <todd@××××××.net>
To: gentoo-dev@g.o
Subject: [gentoo-dev] Problem with net.eth1 startup script
Date: Thu, 07 Mar 2002 01:09:25
1 Hello,
2 After doing a update --world to upgrade about 2 months worth of
3 packages, I ran into this problem. I was following the directions to set
4 up multiple network cards. Here is what I have done so far and some
5 snippets of my config files.
7 I edited /etc/conf.d/net to look like this: (edited for clarity, the
8 rest of the file is commented lines)
10 iface_eth0=" broadcast netmask"
11 iface_eth1="dhcp"
12 dhcpcd_eth1="-R"
14 NOTE: eth0 configures correctly on bootup. The drivers for the network
15 card are also loaded properly. If I run dhcpcd manually, it works fine.
17 I copied net.eth0 to net.eth1 as per the directions.
18 From net.eth1:
19 if [ "`eval echo "\$\{iface_${IFACE}\}"`" != "dhcp" ]
20 then
21 eval /sbin/ifconfig "$IFACE" "\$iface_$IFACE" >/dev/null 2>&1 || return $?
22 else
23 eval /sbin/dhcpcd "\$\{dhcpcd_${IFACE}\}" "$IFACE" >/dev/null 2>&1 || return $?
24 fi
26 The problem is that net.eth1 will not start up as dhcp. I edited the
27 net.eth1 to see what it was trying to do by throwing some echo's in just
28 to see where it was...Everytime no matter what the setting is in
29 conf.d/net, it will only hit the "then" off that if statement. I hacked
30 the script to look like this:
32 if [ "`eval echo "\$\{iface_${IFACE}\}"`" != "dhcp" ]
33 then
34 eval /sbin/dhcpcd -R eth1 >/dev/null 2>&1 || return $?
35 else
36 eval /sbin/ifconfig "$IFACE" "\$iface_$IFACE" >/dev/null 2>&1 || return $?
37 fi
39 This works for the time being, but I'd like to correct the root cause of
40 the problem. While starting up, it says "Bringing eth1 up" so I know
41 $IFACE has the correct value. But I am stumped as to why the rest isn't
42 working.
44 Any help is appreciated!
45 --
46 Todd Punderson <todd@××××××.net>


Subject Author
Re: [gentoo-dev] Problem with net.eth1 startup script Martin Schlemmer <azarah@g.o>