summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/contrib/ovs/dirs.py13
-rw-r--r--ryu/contrib/ovs/dirs.py.template17
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@"""