diff options
author | Gordon Chung <chungg@ca.ibm.com> | 2013-01-25 13:17:10 -0500 |
---|---|---|
committer | Gordon Chung <chungg@ca.ibm.com> | 2013-02-05 07:52:48 -0500 |
commit | a9d53dc93e962b99b3c20e77ea7863952de8e424 (patch) | |
tree | 8c562bcadd93b89967354bc8560975e03dd27a28 /bin | |
parent | 7691276b869a86c2b75631d5bede9f61e030d9d8 (diff) | |
download | keystone-a9d53dc93e962b99b3c20e77ea7863952de8e424.tar.gz keystone-a9d53dc93e962b99b3c20e77ea7863952de8e424.tar.xz keystone-a9d53dc93e962b99b3c20e77ea7863952de8e424.zip |
add check for config-dir parameter (bug1101129)
Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/keystone-all | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bin/keystone-all b/bin/keystone-all index ca700110..6a4e7c95 100755 --- a/bin/keystone-all +++ b/bin/keystone-all @@ -85,10 +85,15 @@ if __name__ == '__main__': if CONF.debug: CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG) - if not CONF.config_file: - print "No config files could be found." - CONF.print_help() - sys.exit(1) + if CONF.config_file: + paste_config = CONF.config_file[0] + else: + paste_config = CONF.find_file('keystone.conf') + if not paste_config: + print ("The keystone.conf file could not be found in the " + "configuration directories.") + CONF.print_help() + sys.exit(1) monkeypatch_thread = not CONF.standard_threads pydev_debug_url = utils.setup_remote_pydev_debug() @@ -101,14 +106,14 @@ if __name__ == '__main__': eventlet.patcher.monkey_patch(all=False, socket=True, time=True, thread=monkeypatch_thread) - options = deploy.appconfig('config:%s' % CONF.config_file[0]) + options = deploy.appconfig('config:%s' % paste_config) servers = [] - servers.append(create_server(CONF.config_file[0], + servers.append(create_server(paste_config, 'admin', CONF.bind_host, int(CONF.admin_port))) - servers.append(create_server(CONF.config_file[0], + servers.append(create_server(paste_config, 'main', CONF.bind_host, int(CONF.public_port))) |