Enhanced identification of HOST_IP and eth device

Enhance the algorithm to automatically identify the HOST_IP
to select the first eth device that has an IP address.
This helps systems where eth0 is not the default ethernet
device.