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:
parent
8aefef51bd
commit
4b90f751ca
13
ryu/contrib/ovs/dirs.py
Normal file
13
ryu/contrib/ovs/dirs.py
Normal 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"""
|
@ -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@"""
|
Loading…
Reference in New Issue
Block a user