Comment 4 for bug 303159

Revision history for this message
Stephan Trebels (ncubede) wrote :

I dont think I understand what you are trying to do.

We could determine the MAC from HAL, right. The issue is, that we cannot do anything from there, I really wonder how this ever worked for me even with the eth0-XXX naming convention, how did it know which interface to operate on? Consider the following example interfaces file from /usr/share/doc/ifupdown/examples/network-interfaces.gz

auto eth0 eth1

mapping eth0 eth1
    script /path/to/get-mac-address.sh
    map 11:22:33:44:55:66 lan
    map AA:BB:CC:DD:EE:FF internet

iface lan inet static
    address 192.168.42.1
    netmask 255.255.255.0
    pre-up /usr/local/sbin/enable-masq $IFACE

iface internet inet dhcp
    pre-up /usr/local/sbin/firewall $IFACE

both auto and mapping apply to multiple values which the parser does not support as of today,
at least I think so.

Additionally we don't know the mac address of each interface before HAL registers
the device. For the iface stanzas we have no clue, which physical interface they will be applied to.
 I suspect this example is to work around issues of ethernet device naming without iftab & friends.

So, a priori we can treat a mapping as a device name (which it is) which can then be used just like a
VPN connection, i.e. it can be switched on and off, or we could allow via nm-applet to "link" one of
the unused stanzas to the mapping device, cool but a lot of change.