Closed sch-m closed 3 years ago
@nemesisdesign Is there anything I can do to get this PR merged?
I have one doubt:
One of the purposes of
fix_uci_config
is to remove the default OpenWrt SSID.What happens if the configuration from OpenWISP Controller does not include any WiFi interface?
Wouldn't it mean that the wifi services would not be reloaded?
When I think about it, if I'm not wrong, on recent OpenWRT versions the radio is disabled by default, however, some custom or old OpenWRT versions may have it turned on by default and rely on this part of the code to ensure the default SSID is removed and the WiFI config reloaded accordingly.
What about changing the order in fix_uci_config like this?:
openwisp-uci-autoname
openwisp-remove-default-wifi
The openwisp agent modifies the configuration on first contact by rewriting all anonymous uci sections into named uci sections. This causes almost all services to be restarted even though the configuration has not really changed. To prevent this from happening, the md5sums are rewritten after calling openwisp-uci-autoname. This will reload only those services whose configuration has actually been changed.
Signed-off-by: Martin Schiller ms@dev.tdt.de