diff --git a/upstart-jobs/dhclient.nix b/upstart-jobs/dhclient.nix index dd3a41e2ef8d..73f80528c558 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