From e23de214abe2367f18a31e47a4125f6104068b90 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Feb 2007 14:06:15 +0000 Subject: [PATCH] * Only start dhclient on real network interfaces like eth0, not aliases like eth0:0. svn path=/nixos/trunk/; revision=8012 --- upstart-jobs/dhclient.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/upstart-jobs/dhclient.nix b/upstart-jobs/dhclient.nix index dd3a41e2ef8..73f80528c55 100644 --- a/upstart-jobs/dhclient.nix +++ b/upstart-jobs/dhclient.nix @@ -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