Bug #5505
closedservices_dnsmasq.php - Saving does not prompt to Apply, applies automatically, unless an override was edited
100%
Description
The behavior of saving and applying on services_dnsmasq.php is inconsistent with itself and with the behavior in Unbound. Ideally it should always prompt to apply and then only run the apply action when apply is clicked. This isn't a regression, it's been like this for years but it's a good time to clean it up.
The Save action on the main page should:- Mark the "hosts" subsystem dirty so that "Apply" shows up
- Perform a write_config()
The Apply action should run the following:
// Reload filter (we might need to sync to CARP hosts) filter_configure(); /* Update resolv.conf in case the interface bindings exclude localhost. */ system_resolvconf_generate(); /* Start or restart dhcpleases when it's necessary */ system_dhcpleases_configure(); if ($retval == 0) { clear_subsystem_dirty('hosts'); }
Which is currently run during the Save action (and by consequence of how Apply is coded to work on that page, also on Apply)
This will also stop the extra write from happening on "Apply" which is unexpected/unnecessary.
Updated by Anonymous almost 9 years ago
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Jim Pingle
Updated as requested, except:
$retval = filter_configure();
(Adding $retval = )
Updated by Anonymous almost 9 years ago
- % Done changed from 0 to 100
Applied in changeset 33ed4d60827ccb8d323719bb7d902cc272f5d513.
Updated by Jim Pingle almost 9 years ago
- Status changed from Feedback to Resolved
Still wasn't quite what I intended. I went ahead and fixed it up though and tested it after. Seems to behave consistently now. Save only saves, apply actually activates the settings in each case. No extraneous saves and no surprise applies.