Try to test which interface is available before calling dhcp.