all: update handling of local config

For local config, we don't want to alter what user explicitly set, and
only try filling in missing value.

While at it, also remove the dnsmasq port delete on openwrt, we don't
need that hack anymore.
This commit is contained in:
Cuong Manh Le
2023-07-11 18:23:09 +07:00
committed by Cuong Manh Le
parent a4edf266f0
commit dc61fd2554
3 changed files with 87 additions and 18 deletions
-5
View File
@@ -49,11 +49,6 @@ func (o *Openwrt) PreRun() error {
}
func (o *Openwrt) Setup() error {
// Delete dnsmasq port if set.
if _, err := uci("delete", "dhcp.@dnsmasq[0].port"); err != nil && !errors.Is(err, errUCIEntryNotFound) {
return err
}
data, err := dnsmasq.ConfTmpl(dnsmasq.ConfigContentTmpl, o.cfg)
if err != nil {
return err