diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-10-12 11:15:17 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-11-03 15:02:57 +0900 |
commit | 4b90f751cab018b88bd7015355ca0266cadf2067 (patch) | |
tree | b477692ba4d2baff9491d6e32d5482b13625dff6 | |
parent | 8aefef51bd666c950124fdf0093e9c61a1236b1c (diff) |
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>
-rw-r--r-- | ryu/contrib/ovs/dirs.py | 13 | ||||
-rw-r--r-- | ryu/contrib/ovs/dirs.py.template | 17 |
2 files changed, 13 insertions, 17 deletions
diff --git a/ryu/contrib/ovs/dirs.py b/ryu/contrib/ovs/dirs.py new file mode 100644 index 00000000..de1605f1 --- /dev/null +++ b/ryu/contrib/ovs/dirs.py @@ -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""" diff --git a/ryu/contrib/ovs/dirs.py.template b/ryu/contrib/ovs/dirs.py.template deleted file mode 100644 index 370c69f4..00000000 --- a/ryu/contrib/ovs/dirs.py.template +++ /dev/null @@ -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@""" |