Turris Omnia - DHCP and local hosts file

Hi everyone,
I tried to solve annoing problem how to mix DHCP with hosts file. After looking on many more less complicated solutions I came with this ugly hack :slight_smile:.
In /etc/resolver/dhcp_host_domain_ng.py simply change in Kresd class empty file initialization from “/tmp/dhcp.empty” to “/etc/hosts” like this:

class Kresd:
    def __init__(self,
             empty_file="/tmp/dhcp.empty"):    <== change to "/etc/hosts"

I also added uci configuration for this but it’s not important.

So I hope it will be usefull for somebody :slight_smile:


Post must be at least 20 characters

For a nicer way see the wiki.

Well, God bless you man :slight_smile: That is much better way.