3
0
Fork 0
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:
Eelco Dolstra 2007-02-22 14:06:15 +00:00
parent e576209a61
commit e23de214ab

View file

@ -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