This is a temporary solution, but a first step into cleaning up rrd stat collection.
In this first milestone, we keep using the generated script, but remove the loop and sleep construct out of it, offering the posibility to handle service control to cron. To prevent the script being written at the same time we're collecting, we always lock the script before use.
should fix: https://github.com/opnsense/core/issues/7753
The idea was opnsense-"devel" annotation, but there is a "devel" directory
in plugins and since we have "master" or "main" alias (that we want to switch
to some day even) it's better to remove this cruft.
Ideally we should really handle an array of parent hardware
devices here. In some cases IPv6 device is missed as well.
And later on the code will not check if this was a device
node for a modem so wrapping the hardware stuff into a function
for iteration is the way to go.
Take 10 seconds off. Seen today while testing other PPP changes.
Since I don't have functional PPPoE the full timeout is taken and
the log message is emitted correctly.
squid package errors may manifest during major upgrade as well making
it necessary to run the cleanup in advance and not in background mode.
It would be nicer to avoid code duplication, but that can happen the
next time something needs to be adjusted in the actual cleanup routine.
IPv6 addresses might be tentative. lighttpd will fail when trying to bind to a tentative address. This commit skips tentative IPv6 addresses for binding.
Otherwise the check will "approve" an interface that is not yet up, and subsequent
calls to fetch the gateway of that interface might fail if issued to quickly thereafter.
Emit the new config, but do not write it to the disk yet.
Make sure we can take the config file lock before proceeding.
If we cannot get the lock the work is already being done so
exit in this case.
While here bail early on empty listeners and restructure and
consolidate the config dir path with the resulting config out
of /var/etc.
In the classic, legacy server variant there was an option called
"dynamic_ip" which injected the options `persist-remote-ip` and `float`
into the generated configuration file. In the modern variant
`persist-remote-ip` is already available, but `float` isn't available
anymore.
The OpenVPN `float` option is used to allow client to change IP
addresses during an ongoing connection to allow roaming e.g. in mobile
networks or changes in the client WiFi.
The sysctls specify "cpu" so it makes sense to follow that especially
since some systems will report the same temperature for the HT sibling
so it's not a core it's a thread.