contrib/ovs/dirs: replace @variables@ which is replaced by configure

Normally dirs.py is created from dirs.py.template by configure script.
Create it manually for our own copy.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
This commit is contained in:
Isaku Yamahata 2012-10-12 11:15:17 +09:00 committed by FUJITA Tomonori
parent 8aefef51bd
commit 4b90f751ca
2 changed files with 13 additions and 17 deletions

13
ryu/contrib/ovs/dirs.py Normal file
View File

@ -0,0 +1,13 @@
import os
PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """/usr/share/openvswitch""")
RUNDIR = os.environ.get("OVS_RUNDIR", """/var/run/openvswitch""")
LOGDIR = os.environ.get("OVS_LOGDIR", """/var/log/openvswitch""")
BINDIR = os.environ.get("OVS_BINDIR", """/usr/bin""")
DBDIR = os.environ.get("OVS_DBDIR")
if not DBDIR:
sysconfdir = os.environ.get("OVS_SYSCONFDIR")
if sysconfdir:
DBDIR = "%s/openvswitch" % sysconfdir
else:
DBDIR = """/etc/openvswitch"""

View File

@ -1,17 +0,0 @@
## 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@"""