* 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.
|
# Determine the interface on which to start dhclient.
|
||||||
interfaces=
|
interfaces=
|
||||||
|
|
||||||
# !!! apparent race; operstate seems to have a slight delay, so
|
for i in $(cd /sys/class/net && ls -d *); do
|
||||||
# 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
|
|
||||||
if test \"$i\" != \"lo\"; then
|
if test \"$i\" != \"lo\"; then
|
||||||
|
echo \"Running dhclient on $i\"
|
||||||
interfaces=\"$interfaces $i\"
|
interfaces=\"$interfaces $i\"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user