[svn] commit: r1450 - in /trunk/src/bin/bindctl: bindctl-source.py.in run_bindctl.sh.in

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 16 15:12:41 UTC 2010


Author: jreed
Date: Tue Mar 16 15:12:41 2010
New Revision: 1450

Log:
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.

Modified:
    trunk/src/bin/bindctl/bindctl-source.py.in
    trunk/src/bin/bindctl/run_bindctl.sh.in

Modified: trunk/src/bin/bindctl/bindctl-source.py.in
==============================================================================
--- trunk/src/bin/bindctl/bindctl-source.py.in (original)
+++ trunk/src/bin/bindctl/bindctl-source.py.in Tue Mar 16 15:12:41 2010
@@ -111,7 +111,14 @@
         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:

Modified: trunk/src/bin/bindctl/run_bindctl.sh.in
==============================================================================
--- trunk/src/bin/bindctl/run_bindctl.sh.in (original)
+++ trunk/src/bin/bindctl/run_bindctl.sh.in Tue Mar 16 15:12:41 2010
@@ -8,5 +8,8 @@
 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 $*




More information about the bind10-changes mailing list