With this, there is consistency in setting the default route
and associated marker file. Nothing is done before the decision
is final, so we may not end up with a missing route after an
attempt to reconfigure for something that doesn't work anyway.
DHCPv4 and PPP still do this manually, but we will have to route
them through the same logic instead of them manually handling their
routes. 6rd and 6to4 may have a similar issue as well.
While here, swap the system_routing_configure() arguments to
align with the way other configure functions present their
arguments (verbose print flag first).
Gateway monitoring and default switching improvement since 2016.
Push $keep into default handling, it may be useful in general to
avoid spurious switches. It could also be a default probably.
We have a function pair rrd_import() / rrd_export() now, which do
wildly different things even though they've been used for a single
purpose:
(1) rrd_export() writes a string, appends it to the config.xml
(2) rrd_import() takes a parsed config portion, but not as an
argument, rather as a global config element
(3) There was also an older backup clue which exported files, but
simply packed them up for restore after boot
If we can get the system to unify the usage we'll end up with a
neat way of backing, restoring and migrating RRD data, although
I'm not sure if this can be fully compatible with the old files.
Looking at openvpn_configure_server() and openvpn_configure_client()
it becomes a bit clearer why they take a config.xml subset: it's beause
the write_config() ordering was flipped. We could probably now pass
an ID and let the code figure out if it is a client or server...
Early installer is really about an untained system, so
we defer *all* system setup and only keep the loopback
configuration above it. This way, after config import
from the installer system_login_configure() is up-to-date.
This is the glue needed to be entirely plugin-agnostic, it only
needs new hooks for spots we haven't pluginified yet. The dns
subsystem is another likely candidate in the long run.
Allows to move these plugins away from core: bsnmpd, igmpproxy,
relayd, miniupnpd. ACL and menu entries pending...