mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 04:03:56 +00:00
network-interfaces: cleanup
svn path=/nixos/trunk/; revision=24845
This commit is contained in:
parent
f58efe3336
commit
50d8698fd8
@ -8,6 +8,8 @@ let
|
|||||||
|
|
||||||
cfg = config.networking;
|
cfg = config.networking;
|
||||||
|
|
||||||
|
ifconfig = "${nettools}/sbin/ifconfig";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -157,7 +159,7 @@ in
|
|||||||
|
|
||||||
for i in $(cd /sys/class/net && ls -d *); do
|
for i in $(cd /sys/class/net && ls -d *); do
|
||||||
echo "Bringing up network device $i..."
|
echo "Bringing up network device $i..."
|
||||||
${nettools}/sbin/ifconfig $i up || true
|
${ifconfig} $i up || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure the manually specified interfaces.
|
# Configure the manually specified interfaces.
|
||||||
@ -169,7 +171,7 @@ in
|
|||||||
if test -n "${i.subnetMask}"; then
|
if test -n "${i.subnetMask}"; then
|
||||||
extraFlags="$extraFlags netmask ${i.subnetMask}"
|
extraFlags="$extraFlags netmask ${i.subnetMask}"
|
||||||
fi
|
fi
|
||||||
${nettools}/sbin/ifconfig "${i.name}" "${i.ipAddress}" $extraFlags || true
|
${ifconfig} "${i.name}" "${i.ipAddress}" $extraFlags || true
|
||||||
''
|
''
|
||||||
else "") cfg.interfaces}
|
else "") cfg.interfaces}
|
||||||
|
|
||||||
@ -202,7 +204,7 @@ in
|
|||||||
''
|
''
|
||||||
#for i in $(cd /sys/class/net && ls -d *); do
|
#for i in $(cd /sys/class/net && ls -d *); do
|
||||||
# echo "Taking down network device $i..."
|
# echo "Taking down network device $i..."
|
||||||
# ${nettools}/sbin/ifconfig $i down || true
|
# ${ifconfig} $i down || true
|
||||||
#done
|
#done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user