Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
48211526
Commit
48211526
authored
Mar 03, 2011
by
JINMEI Tatuya
Browse files
[trac606] added ability to change the location of config file runtime.
this is one of prerequisites to perform various system tests.
parent
87829d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/cfgmgr/b10-cfgmgr.py.in
View file @
48211526
...
...
@@ -26,10 +26,18 @@ import os
isc.util.process.rename()
# If B10_FROM_SOURCE is set in the environment, we use data files
# from a directory relative to that, otherwise we use the ones
# installed on the system
# from a directory relative to the value of that variable, or, if defined,
# relative to the value of B10_FROM_SOURCE_CONFIG_DATA_PATH. Otherwise
# we use the ones installed on the system.
# B10_FROM_SOURCE_CONFIG_DATA_PATH is specifically intended to be used for
# tests where we want to use variuos types of configuration within the test
# environment. (We may want to make it even more generic so that the path is
# passed from the boss process)
if "B10_FROM_SOURCE" in os.environ:
DATA_PATH = os.environ["B10_FROM_SOURCE"]
if "B10_FROM_SOURCE_CONFIG_DATA_PATH" in os.environ:
DATA_PATH = os.environ["B10_FROM_SOURCE_CONFIG_DATA_PATH"]
else:
DATA_PATH = os.environ["B10_FROM_SOURCE"]
else:
PREFIX = "@prefix@"
DATA_PATH = "@localstatedir@/@PACKAGE@".replace("${prefix}", PREFIX)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment