Tiny install bug spotted - multiple setDHCPD insertions possible


#1

so I managed somehow to run install 2 times,
resulting in 2 calls to setDHCPD(), and 2 static IP stanzas appended to /etc/dhcpcd.conf

I had different IPV4_ADDRESS the 2x, defeating the check preventing this:
if grep -q “${IPV4_ADDRESS}” /etc/dhcpcd.conf; then

it occurred to me to modify the stanza insertion to include “# added by pihole”
on each line, so theyre filterable with grep -v
and alter uninstall accordingly.

does this outline an acceptable patch ?
any thoughts or other requirements ?


#2

You can submit an issue to the GitHub repo and even make a Pull Request if you are able to.