mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
dirs: dbdir default must be based on sysconfdir.
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>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# These are the default directories. They will be replaced by the
|
||||
# configured directories at install time.
|
||||
|
||||
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")
|
||||
DBDIR = os.environ.get("OVS_DBDIR", "/usr/local/etc/openvswitch")
|
||||
BINDIR = os.environ.get("OVS_BINDIR", "/usr/local/bin")
|
||||
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"""
|
||||
|
||||
Reference in New Issue
Block a user