I know, I know, backing up rrd and restoring it after reboot seems
like overkill, but the good thing is that if you ever decide to
install from a clean image the config import is able to pick up
your backups as well and you will not lose any history.
* Renamed pfsense-utils.inc to legacy.inc, which can cause issues
on git auto-mount developer machines. Be wary.
* Removed '/usr/local/www/' prefix from require statements that
should never use absolute paths (unless you are never going to
move files, but we already did...).
* Remove an unhealthy function that wrote arbitrary PHP files and then
style checked them, twice.
* The usual license cleanups so that the headers are easy to read
and actually make you want to see the rest of the file because of it.
* Code style, indent and obvious bug fix (missed unlock in return path).
This allows us to grep for the file name as "name.something.xml"
and still be able to find the variable or path or binary or so,
while the actual file name is only set once avoiding typos in the
process as well...
The code is full of duplicated paths and can probably be shrunk
down to 50% of its current size, making it easier to follow,
debug, extend, yadda, yadda...
It's been confusing to say the least, resulting in multiple
misuses throughout the code. The idea was that /cf pointed
to a read-write root, while / pointed to read-only root.
For non-embedded images this was emulated by linking
/conf -> /cf/conf, which, is a bit questionable because now
you can write from /conf as well and don't have to use /cf/conf
at all.
A couple of lines are left in /usr/local/etc/rc which need to
be reviewed so that migration paths are safe for all types
of firmware upgrades.
/tmp is unlikely to change. If, however you decide to change
it to somewhere else the likelihood of someone else hardcoding
/tmp just to annoy you is so high that it simply makes no sense
to keep any softcoding in this regard. More batches coming, but
since the usage is so widespread, I'll push it bit by bit.