[oe] confused by netbase/udev

Paul Menzel paulepanter at users.sourceforge.net
Tue Feb 9 22:58:40 UTC 2010


Am Dienstag, den 09.02.2010, 16:38 +0100 schrieb Steffen Sledz:
> Petr Štetiar wrote:
> > man 5 interfaces?

[…]

> OK, i try to solve one problem after the other. Let's accept that
> every new USB-NIC gets a new name for now (using a pool of interface names).
> 
> I've tried to create a /etc/network/interfaces which fits my wishes:
> 
> ------------->snip<----------------
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
> 
> # the loopback interface
> auto lo
> iface lo inet loopback
> 
> # interfaces to bring up at boot time
> auto eth0
> 
> # the onboard NIC
> iface eth0 inet dhcp
> 
> # interfaces to bring up when hotplugging
> allow-hotplug eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
> 
> # additional USB-NIC's
> iface eth1 inet dhcp
> iface eth2 inet dhcp
> iface eth3 inet dhcp
> iface eth4 inet dhcp
> iface eth5 inet dhcp
> iface eth6 inet dhcp
> iface eth7 inet dhcp
> iface eth8 inet dhcp
> ------------->snip<----------------
> 
> This works fine when hotplugging, but the USB-NIC is not recognised
> when connected while booting up. :(

Did you test this with both USB-NICs?

> I tried to change the one line responsible for that to
> 
>   auto eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
> 
> This works better but leads to dirty errors messages while booting
> and shutdown for disconnected interfaces:
> 
> boot:
> eth1: unknown interface: No such device
> eth2: unknown interface: No such device
> eth3: unknown interface: No such device
> eth4: unknown interface: No such device
> eth5: unknown interface: No such device
> eth6: unknown interface: No such device
> eth7: unknown interface: No such device
> eth8: unknown interface: No such device
> 
> shutdown:
> Deconfiguring network interfaces... cat: /var/run/udhcpc.eth0.pid: No such file or directory
> cat: /var/run/udhcpc.eth1.pid: No such file or directory
> eth1: unknown interface: No such device
> cat: /var/run/udhcpc.eth2.pid: No such file or directory
> eth2: unknown interface: No such device
> cat: /var/run/udhcpc.eth3.pid: No such file or directory
> eth3: unknown interface: No such device
> cat: /var/run/udhcpc.eth4.pid: No such file or directory
> eth4: unknown interface: No such device
> cat: /var/run/udhcpc.eth5.pid: No such file or directory
> eth5: unknown interface: No such device
> cat: /var/run/udhcpc.eth6.pid: No such file or directory
> eth6: unknown interface: No such device
> cat: /var/run/udhcpc.eth7.pid: No such file or directory
> eth7: unknown interface: No such device
> cat: /var/run/udhcpc.eth8.pid: No such file or directory
> eth8: unknown interface: No such device
> done.
> 
> I'm not really happy with that. :(

How are your boot/init scripts activate the interfaces, i. e. what
options to they pass to `ifup`?

I still suggest to use a daemon as NetworkManager which as far as I know
compensate this flaw of udev and `/e/n/i` which were created when a
system had no dynamically added (non-wifi) NICs.

Although I must admit that I find a use case that someone is changing
the NICs not very common. Normally you get one and always use that
device with this one. And if you change it you normally only have to
edit `/e/n/i` once since from now on you will use the new device.


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20100209/199478dc/attachment-0002.sig>


More information about the Openembedded-devel mailing list