From 862e7300437735f2aa28f40cedef2eb84ce1f291 Mon Sep 17 00:00:00 2001 From: rread Date: Tue, 20 Aug 2002 17:43:48 +0000 Subject: [PATCH] - allow lconf to continue to run in debug mode even if acceptor and lctl are not available. --- lustre/utils/lconf | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index 1463b3c..d8b278a 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -110,7 +110,11 @@ class LCTLInterface: """ self.lctl = find_prog(cmd) if not self.lctl: - raise RuntimeError, "unable to find lctl binary." + if isnotouch(): + debug('! lctl not found') + self.lctl = 'lctl' + else: + raise CommandError, "unable to find lctl binary." def run(self, cmds): """ @@ -805,12 +809,8 @@ def fetch(url): # * configure devices with lctl # Shutdown does steps in reverse # -lctl = LCTLInterface('lctl') def main(): - global options, TCP_ACCEPTOR - TCP_ACCEPTOR = find_prog('acceptor') - if not TCP_ACCEPTOR: - panic('acceptor not found') + global options, TCP_ACCEPTOR, lctl args = parse_cmdline(sys.argv[1:]) if len(args) > 0: if not os.access(args[0], os.R_OK | os.W_OK): @@ -830,6 +830,17 @@ def main(): options['hostname'].append(host) options['hostname'].append('localhost') print "configuring for host: ", options['hostname'] + + TCP_ACCEPTOR = find_prog('acceptor') + if not TCP_ACCEPTOR: + if isnotouch(): + TCP_ACCEPTOR = 'acceptor' + debug('! acceptor not found') + else: + panic('acceptor not found') + + lctl = LCTLInterface('lctl') + doHost(dom.documentElement, options['hostname'], options.has_key('cleanup') ) if __name__ == "__main__": @@ -841,3 +852,4 @@ if __name__ == "__main__": print '' pass + -- 1.8.3.1