dnsmasq: rework init procedure