Commit 82032d93 authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

If B10_FROM_SOURCE is set in the environment, we use PEM file

from a directory relative to that, otherwise we use the one
installed on the system.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1450 e5f2f494-b856-4b98-b285-d166d9295462
parent fa081c17
......@@ -111,7 +111,14 @@ if __name__ == '__main__':
set_bindctl_options(parser)
(options, args) = parser.parse_args()
server_addr = options.addr + ':' + str(options.port)
tool = BindCmdInterpreter(server_addr, pem_file = "@@SYSCONFDIR@@/bind10/bindctl.pem")
# If B10_FROM_SOURCE is set in the environment, we use PEM file
# from a directory relative to that, otherwise we use the one
# installed on the system
if "B10_FROM_SOURCE" in os.environ:
SYSCONF_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/bindctl"
else:
SYSCONF_PATH = "@@SYSCONFDIR@@/@PACKAGE@"
tool = BindCmdInterpreter(server_addr, pem_file = SYSCONF_PATH + "/bindctl.pem")
prepare_config_commands(tool)
tool.run()
except Exception as e:
......
......@@ -8,5 +8,8 @@ BINDCTL_PATH=@abs_top_srcdir@/src/bin/bindctl
PYTHONPATH=@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/bin
export PYTHONPATH
B10_FROM_SOURCE=@abs_top_srcdir@
export B10_FROM_SOURCE
cd ${BINDCTL_PATH}
exec ${PYTHON_EXEC} -O bindctl $*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment