X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=python%2Fovs%2Fdirs.py;h=b5e68a0a26a5e292b809213c56a623a4d659ac80;hb=c3bf549800cecfa0c5fbd669139f441b7dd5d237;hp=f8e73087f5316bdf89075824fc7ecd3f859bcffc;hpb=991559357f6a03c3a5b70c053c8c2554aa8d5ee4;p=openvswitch diff --git a/python/ovs/dirs.py b/python/ovs/dirs.py index f8e73087..b5e68a0a 100644 --- a/python/ovs/dirs.py +++ b/python/ovs/dirs.py @@ -1,7 +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""") +BINDIR = os.environ.get("OVS_BINDIR", """/usr/local/bin""") -PKGDATADIR = "/usr/local/share/openvswitch" -RUNDIR = "/var/run" -LOGDIR = "/usr/local/var/log" -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"""