mirror of
https://github.com/openvswitch/ovs
synced 2025-10-23 14:57:06 +00:00
Some in-tree and out-of-tree code sets the OVS_SYSCONFDIR environment variable to control where /etc files go (mostly for test purposes). When the database directory (dbdir) was split off from the sysconfdir, the configure-time default continued to be based on the sysconfdir, but overriding the sysconfdir at runtime with OVS_SYSCONFDIR didn't have any effect on the dbdir, which caused a visible change in behavior for code that set the OVS_SYSCONFDIR environment variable. This commit reverts that change in behavior, by basing the dbdir on OVS_SYSCONFDIR if that environment variable is set (but the OVS_DBDIR environment variable is not). Signed-off-by: Ben Pfaff <blp@nicira.com>
14 lines
495 B
Python
14 lines
495 B
Python
import os
|
|
PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """/usr/local/share/openvswitch""")
|
|
RUNDIR = os.environ.get("OVS_RUNDIR", """/var/run""")
|
|
LOGDIR = os.environ.get("OVS_LOGDIR", """/usr/local/var/log""")
|
|
BINDIR = os.environ.get("OVS_BINDIR", """/usr/local/bin""")
|
|
|
|
DBDIR = os.environ.get("OVS_DBDIR")
|
|
if not DBDIR:
|
|
sysconfdir = os.environ.get("OVS_SYSCONFDIR")
|
|
if sysconfdir:
|
|
DBDIR = "%s/openvswitch" % sysconfdir
|
|
else:
|
|
DBDIR = """/usr/local/etc/openvswitch"""
|