network-interfaces: cleanup
svn path=/nixos/trunk/; revision=24845
This commit is contained in:
parent
f58efe3336
commit
50d8698fd8
1 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,8 @@ let
|
|||
|
||||
cfg = config.networking;
|
||||
|
||||
ifconfig = "${nettools}/sbin/ifconfig";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -157,7 +159,7 @@ in
|
|||
|
||||
for i in $(cd /sys/class/net && ls -d *); do
|
||||
echo "Bringing up network device $i..."
|
||||
${nettools}/sbin/ifconfig $i up || true
|
||||
${ifconfig} $i up || true
|
||||
done
|
||||
|
||||
# Configure the manually specified interfaces.
|
||||
|
@ -169,7 +171,7 @@ in
|
|||
if test -n "${i.subnetMask}"; then
|
||||
extraFlags="$extraFlags netmask ${i.subnetMask}"
|
||||
fi
|
||||
${nettools}/sbin/ifconfig "${i.name}" "${i.ipAddress}" $extraFlags || true
|
||||
${ifconfig} "${i.name}" "${i.ipAddress}" $extraFlags || true
|
||||
''
|
||||
else "") cfg.interfaces}
|
||||
|
||||
|
@ -202,7 +204,7 @@ in
|
|||
''
|
||||
#for i in $(cd /sys/class/net && ls -d *); do
|
||||
# echo "Taking down network device $i..."
|
||||
# ${nettools}/sbin/ifconfig $i down || true
|
||||
# ${ifconfig} $i down || true
|
||||
#done
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue