forked from mirrors/nixpkgs
* Only start dhclient on real network interfaces like eth0, not aliases like eth0:0.
svn path=/nixos/trunk/; revision=8012
This commit is contained in:
parent
e576209a61
commit
e23de214ab
|
@ -17,18 +17,9 @@ script
|
|||
# Determine the interface on which to start dhclient.
|
||||
interfaces=
|
||||
|
||||
# !!! apparent race; operstate seems to have a slight delay, so
|
||||
# if dhclient is started right after network-interfaces, we don't
|
||||
# always see all the interfaces.
|
||||
|
||||
#for i in $(cd /sys/class/net && ls -d *); do
|
||||
# if test \"$i\" != \"lo\" -a \"$(cat /sys/class/net/$i/operstate)\" != 'down'; then
|
||||
# interfaces=\"$interfaces $i\"
|
||||
# fi
|
||||
#done
|
||||
|
||||
for i in $(ifconfig | grep '^[^ ]' | sed 's/ .*//'); do
|
||||
for i in $(cd /sys/class/net && ls -d *); do
|
||||
if test \"$i\" != \"lo\"; then
|
||||
echo \"Running dhclient on $i\"
|
||||
interfaces=\"$interfaces $i\"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue