network-interfaces: MAC address support take 2: now it seems to work
svn path=/nixos/trunk/; revision=24847
This commit is contained in:
parent
72422d4126
commit
2224d78b33
@ -8,7 +8,7 @@ let
|
|||||||
|
|
||||||
# Don't start dhclient on explicitly configured interfaces.
|
# Don't start dhclient on explicitly configured interfaces.
|
||||||
ignoredInterfaces =
|
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.
|
stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ in
|
|||||||
''
|
''
|
||||||
echo "Configuring interface ${i.name}..."
|
echo "Configuring interface ${i.name}..."
|
||||||
${ifconfig} "${i.name}" down || true
|
${ifconfig} "${i.name}" down || true
|
||||||
${ifconfig} hw ether "${i.name}" "${i.macAddress}" || true
|
${ifconfig} "${i.name}" hw ether "${i.macAddress}" || true
|
||||||
''
|
''
|
||||||
else "") cfg.interfaces
|
else "") cfg.interfaces
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user