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 authored and Cuong Manh Le committed 2023-08-09 23:54:23 +07:00
1 parent a4edf266f0
commit dc61fd2554
3 files changed
+87 -18

No files matched your search

-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