Give a warning about using localhost in resolv.conf during install/upgrade

My Pi-hole box is (was) using itself for name resolution.

I've just had an upgrade break as something in the process stopped the DNS server but the next step then tried to do something network related which failed as it couldn't get an IP address.

A quick discussion on twitter found you don't recommend pointing the host at itself as a resolver, this makes sense now I've had it mess things up, but was a pain at the time.

I'm suggesting you check /etc/resolv.conf to see if it is pointing at localhost and, if it is, then flag an alert in the installer to warn people to use something different. I agree not everyone will read it, but it may help some people.

To further expand on what I mentioned on Twitter:

There are only two places in the install script that stop pihole-FTL:

Here, when there is a detected upgrade for the pihole-FTL binary itself. We first download the binary, then stop and restart

Here before making changes to some log file paths

Before finally starting it again here

Between stopping and starting pihole-FTL again, there doesn't appear to be anywhere that needs to do a DNS lookup - so I am unsure where exactly it would have fallen over

Unfortunately I fixed it without taking a screenshot so can't say where it failed. It was definitely trying to do something network related, I remember seeing the lookup failure error.

Yeah, absolutely. Like I said on Twitter - I'm not saying it can't happen - I just can't currently see where it might :slight_smile: