mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +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>
18 lines
663 B
Plaintext
18 lines
663 B
Plaintext
## The @variables@ in this file are replaced by default directories for
|
|
## use in python/ovs/dirs.py in the source directory and replaced by the
|
|
## configured directories for use in the installed python/ovs/dirs.py.
|
|
##
|
|
import os
|
|
PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """@pkgdatadir@""")
|
|
RUNDIR = os.environ.get("OVS_RUNDIR", """@RUNDIR@""")
|
|
LOGDIR = os.environ.get("OVS_LOGDIR", """@LOGDIR@""")
|
|
BINDIR = os.environ.get("OVS_BINDIR", """@bindir@""")
|
|
|
|
DBDIR = os.environ.get("OVS_DBDIR")
|
|
if not DBDIR:
|
|
sysconfdir = os.environ.get("OVS_SYSCONFDIR")
|
|
if sysconfdir:
|
|
DBDIR = "%s/openvswitch" % sysconfdir
|
|
else:
|
|
DBDIR = """@DBDIR@"""
|