network-interfaces: MAC address support take 2: now it seems to work

svn path=/nixos/trunk/; revision=24847
This commit is contained in:
Evgeny Egorochkin 2010-11-24 22:58:53 +00:00
parent 72422d4126
commit 2224d78b33
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ let
# Don't start dhclient on explicitly configured interfaces.
ignoredInterfaces =
map (i: i.name) (lib.filter (i: i ? ipAddress) config.networking.interfaces);
map (i: i.name) (lib.filter (i: i ? ipAddress && i.ipAddress != "" ) config.networking.interfaces);
stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.

View File

@ -171,7 +171,7 @@ in
''
echo "Configuring interface ${i.name}..."
${ifconfig} "${i.name}" down || true
${ifconfig} hw ether "${i.name}" "${i.macAddress}" || true
${ifconfig} "${i.name}" hw ether "${i.macAddress}" || true
''
else "") cfg.interfaces
}