Browse Source

[1288] fixed startup failure for installed environment.

JINMEI Tatuya 13 years ago
parent
commit
bdde86c059

+ 6 - 9
src/bin/bind10/bind10_src.py.in

@@ -628,7 +628,7 @@ class BoB:
         # ... and start
         return self.start_process("b10-resolver", resargs, self.c_channel_env)
 
-    def __ld_path_hack(self, env):
+    def __ld_path_hack(self):
         # XXX: a quick-hack workaround.  xfrin/out will implicitly use
         # dynamically loadable data source modules, which will be installed in
         # $(libdir).
@@ -644,7 +644,7 @@ class BoB:
         # the same as for the libexec path addition
         # TODO: Once #1292 is finished, remove this method and the special
         # component, use it as normal component.
-        c_channel_env = dict(self.c_channel_env)
+        env = dict(self.c_channel_env)
         if ADD_LIBEXEC_PATH:
             cur_path = os.getenv('DYLD_LIBRARY_PATH')
             cur_path = '' if cur_path is None else ':' + cur_path
@@ -653,6 +653,7 @@ class BoB:
             cur_path = os.getenv('LD_LIBRARY_PATH')
             cur_path = '' if cur_path is None else ':' + cur_path
             env['LD_LIBRARY_PATH'] = "@@LIBDIR@@" + cur_path
+        return env
 
     def start_cmdctl(self):
         """
@@ -667,24 +668,20 @@ class BoB:
                                   self.cmdctl_port)
 
     def start_xfrin(self):
-        self.__ld_path_hack(c_channel_env)
-
         # Set up the command arguments.
         args = ['b10-xfrin']
         if self.verbose:
             args += ['-v']
 
-        return self.start_process("b10-xfrin", args, c_channel_env)
-
-    def start_xfrout(self, c_channel_env):
-        self.__ld_path_hack(c_channel_env)
+        return self.start_process("b10-xfrin", args, self.__ld_path_hack())
 
+    def start_xfrout(self):
         # Set up the command arguments.
         args = ['b10-xfrout']
         if self.verbose:
             args += ['-v']
 
-        return self.start_process("b10-xfrout", args, c_channel_env)
+        return self.start_process("b10-xfrout", args, self.__ld_path_hack())
 
     def start_all_components(self):
         """

+ 1 - 1
src/bin/bind10/bob.spec

@@ -15,7 +15,7 @@
             "kind": "dispensable"
           },
           "b10-xfrin": { "special": "xfrin", "kind": "dispensable" },
-          "b10-xfrout": { "special": "Xfrout", "kind": "dispensable" },
+          "b10-xfrout": { "special": "xfrout", "kind": "dispensable" },
           "b10-zonemgr": { "address": "Zonemgr", "kind": "dispensable" },
           "b10-stats": { "address": "Stats", "kind": "dispensable" },
           "b10-stats-httpd": {

+ 1 - 0
src/lib/python/isc/bind10/special_component.py

@@ -159,6 +159,7 @@ def get_specials():
         'cmdctl': CmdCtl,
         # FIXME: Temporary workaround before #1292 is done
         'xfrin': XfrIn,
+        'xfrout': XfrOut,
         # TODO: Remove when not needed, workaround before sockcreator works
         'setuid': SetUID
     }