Loop through all available Ethernet devices to get IP address lease.

On some devices, the netboot kernel could find multiple Ethernet
devices listed in arbitrary order (e.g. devices with cellular module,
multiple Ethernet dongles, or attached to a servo board). We should
try to get an IP address lease on each Ethernet device instead of
hardcode eth0 in the script.

BUG=chrome-os-partner:28096
TEST=manually test on my DUT

Change-Id: Ia5668bf2caee7701e39afc0b8f5f625ebebe1e77
Reviewed-on: https://chromium-review.googlesource.com/195126
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
1 file changed