avalon
avalon copied to clipboard
Remove hard coding of /etc/avalon path in code
trafficstars
I see /etc/avalon hard-coded here:
./shared_kv_storage/setup.py:conf_dir = "/etc/avalon"
./shared_kv_storage/kv_storage/remote_lmdb/lmdb_listener.py: return '/etc/avalon'
Directory /etc/avalon is a reasonable choice of a default config directory. Certainly better than directory$TCF_HOME/config, especially once Avalon becomes packaging and we stop running Avalon under a mixed source/object/configuration directory ($TCF_HOME). But there must be a way to override the location. For example,
$AVALON_CONFIGwith default/etc/avalon$AVALON_HOMEwith default/opt/avalon$AVALON_VARwith default/var/lib/avalon
This is based on the traditional UNIX/Linux practice of separating configuration, executible/read-only files, and writable data files in separate directories (and therefore possibly separate file systems).