servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
171 stars 80 forks source link

Move /var/serval-node to /var/lib/serval-node for FHS complience? #72

Closed petterreinholdtsen closed 10 years ago

petterreinholdtsen commented 11 years ago

According to the file hiearcy standard, used by Debian and others to decide where in the file system a file belong, packages should store their stuff in /var/lib/foo, not /var/foo. Because of this, I suggest to move /var/serval-node to /var/lib/serval-node.

quixotique commented 11 years ago

Probably the path should be more general, eg, /var/lib/serval/localnode. That way, if we ever came to a situation where a node ran more than one Serval daemon (which is possible but not needed by any deployment yet) then we could create several sub directories under /var/lib/serval, one for each instance.

quixotique commented 11 years ago

For proper FHS compliance, the contents of the Serval instance directory really should be split between several directories:

This could be implemented as the standard behaviour if the SERVALINSTANCE_PATH env var is not set. To allow for multiple daemons on the same host, a new env var SERVALD_CONFIG could be supported which pointed to a single config file, which in turn would configure the other paths.

If the SERVALINSTANCE_PATH env var is set, all paths would be formed as they currently are, to preserve compatibility. This env var might be deprecated and removed in future.

lakeman commented 10 years ago

Some work has been done in ba44088e & 53c1b1c0. Can we close this now?

quixotique commented 10 years ago

FHS paths are now fully supported and configurable, but not the SERVALD_CONFIG env var discussed above. See the FHS Paths section of Servald-Configuration.md for the details.