Include another config file from /etc/config/dhcp


Is there a way to include another separate file from inside the /etc/config/dhcp (or other config) file?

I want to have a core config file, and then custom additions in a separate file.

Something like

option include '/etc/dhcp.custom'


See if this suits your needs:

confdir points to /tmp/dnsmasq.d files placed there are treated as config files.

Note this is non permanent storage so you need to recreate on boot up.

Alternatively you can add your DNSMasq options to /etc/dnsmasq.conf that is permanent storage

1 Like

Thanks, that's what I wanted.

Is the syntax inside the included confdir files the same uci style, i.e.

config dhcp 'xxx'
        option interface 'xx'

or raw dnsmasq config parameters?


Just dnsmasq config parameters.

Some adblock scripts use this to add large files in the confdir with: local=/ to block DNS for advertising sites

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.