Network booting detect BIOS vs UEFI

I believe the /etc/init.d/dnsmasq is where the /etc/config/dhcp file is processed and the proper dnsmasq config is generated. If you fix it, please send PR to the OpenWrt packages repo.