mattlongman / Hassio-Access-Point

Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations.
MIT License
92 stars 66 forks source link

No host DNS Server - failed startup #70

Open mclordo opened 8 months ago

mclordo commented 8 months ago

I had problems when starting the access point in standalone mode without an active Ethernet connection on a USB dongle. After a bit of investigation, I found that the DNS server cannot be set. The reason for this is that there is no actual entry for the DNS server. You are check for this in run.sh (image below), but somehow it didn't get triggered in my case, even though nmcli device show | grep IP4.DNS returns nothing. I'm not really familiar with bash, but I don't see anything wrong with it. So I'm a bit confused, but I can't debug it any further.

image

The Option client_dns_override solved the Problem for me, though the warning (like implemented) would have been nice.

ROBOT0-VT commented 8 months ago

Hiya, thanks for raising this.

Seems like the script had some bash-fu that I'm not familiar with 😂

I've reworked this in my in-progress networking refactor, so hopefully the issue will be fixed, but I'll be sure to test for this before pushing.

I've also started using shellcheck in the project to hopefully pick up any other unexpected bash behaviours

ROBOT0-VT commented 8 months ago

For reference, the working fix I've applied is to use HA itself as the built-in DNS, instead of trying to pull HA's DNS servers. Still WIP though