This is better now, but there is still one inconsistency at play that
doesn't seem to matter much in the grand scheme of things. Leaving this
here for @adschellevis to decide.
# configctl template reload 'OPNsense/Unbound/*'
ERR
# configctl template reload 'OPNsense/Unbound/core'
Execute error
# configctl template reload 'OPNsense/Unbounddd'
ERR
While this omits all other callers of "template reload" functionality
we would only like to be concerned with these GUI ones and migrate everything
to using a mutable controller (for maintenance reasons at the very last).
Only make a short hint to where the error is. The service is not started
on purpose now.
Handling is a bit different since the latest selectpicker doesn't select the top item in the list anymore, we need to choose an item to make it look less odd.
We also make the option dependent on the field not being required.
It is invalid for a field to be empty and also be required, therefore
we apply it only if the field isn't required.
Recently did the same for Unbound. The context for the user is clear
and we shouldn't be too concerned for what the user thinks about disabled
interfaces since he disabled them in the first place.
Use the same interface description source in the overview page.
While we are not concerned with interfaces that have disappeared
we should keep track of disabled interfaces since there is no strict
link between this field and the interface (or OpenVPN) configuration
which would make validation fail for the wrong reasons and/or force
the user to deselect the interface in order to proceed.
Also exclude lo0 because it is always added to ensure local resolving
which had no complaints since 2018 when this was reworked. The abilty
to select it would cause the question of why it's not adhered to if
anyone started looking.
* Allow the bridge to come up without members. While the GUI made sure
to avoid empty bridges there is no reason for it and underneath if the
interface was disabled the GUI made the interface disappear from the
selection. So now allow an empty bridge (may be nice for migration)
and show disabled interfaces in the edit page. Fix all callers to not
assume the member property is always set. Can probably go away once
bridges are moved to MVC.
* Inline interface_bridge_add_member() since link_interface_to_bridge()
is the only caller. Improve the parameter passing a bit too.
* Add bridge interface return code to (_)interfaces_bridge_configure().
* Improve device resolution and a few mwexecf() replacements.
* Log the reason why a device could not be attached to bridge when one
device is not there as expected.
Now that we fail if we can't get the tunnel up improve this a bit more:
1. First order of business is adding removing/adding the device.
2. Return the device name when configuration was successful.
3. Use device name return to avoid "linking" failed devices. This
helps us to bring it up later when it is likely ready.
4. Remove the system_routing_configure() madness from device creation.
5. We may have static routes which were not adhered to previously. So now
use the same interfaces_restart_by_device() hook but omit the
interface_configure() to void unwantend recusion in that function.
This has the addded benefit of system_routing_configure() only being
called once for that interface by rc.newwanip(v6).