[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Binding names to network devices



Hi -boot,

Currently there are three bugs against netcfg that complain that if one
has two Ethernet cards plugged in, we can't distinguish between them
by name: they show up simply as Ethernet or Fast Ethernet (or Wireless
Device (802.11x) if it's in /proc/net/wireless) and if you have multiple
ones, determining which one is the one your ethernet cable is plugged into
is a guess and check kind of task.

Is it possible to do something in the hardware detection stage that will
have a database of module filenames and the devices they provide drivers
for (modules that provide a 'common' kind of support for many similar
devices notwithstanding), and store a new ifname (from looking at
/proc/net/dev before and after a prospective call to modprobe) with the
device the module drives into a file that can later be easily parsed by
netcfg? For example,

discover (or whatever) considers 8139too module
snapshot of /proc/net/dev is made
8139too is loaded
if it didn't load correctly, bail
snapshot of /proc/net/dev is made and compared to old one for new device
new device is 'eth0'
write 'eth0:Realtek 8139 10/100 Ethernet' to /etc/network/devnames
continue

This would be really nice to have, but is it possible? I'm wondering
where to add the hook, it probably has to be made in discover, though.

CC me on replies to this thread; I only read -boot rather infrequently
from Gmane. Thanks!

-- 
Joshua Kwan

Attachment: signature.asc
Description: Digital signature


Reply to: