# HG changeset patch # User David Douard # Date 1364984244 -7200 # Node ID 0020aa12af07a45200041ac858a0becf8e2330c3 # Parent 4032499c701ee79207bb3b7f8b4c627c387a335f [c-c create] make post-create step optional (closes #2712041) In this context the "post-create" step refers to the database's creation and initialization. We want to be able to create a new instance but skip the database creation (`db-create` and `db-init` commands) in automatic setup. diff -r 4032499c701e -r 0020aa12af07 cwctl.py --- a/cwctl.py Fri Mar 15 12:11:29 2013 +0100 +++ b/cwctl.py Wed Apr 03 12:17:24 2013 +0200 @@ -365,6 +365,12 @@ ' "list" command. Default to "all-in-one", e.g. an installation ' 'embedding both the RQL repository and the web server.', }), + ('no-post-create', + {'short': 'P', + 'action': 'store_true', + 'default': False, + 'help': 'do not run post-create tasks (database creation, etc.)', + }), ) def run(self, args): @@ -433,7 +439,8 @@ print 'set %s as owner of the data directory' % config['uid'] chown(config.appdatahome, config['uid']) print '\n-> creation done for %s\n' % repr(config.apphome)[1:-1] - helper.postcreate(self.config.automatic) + if not self.config.no_post_create: + helper.postcreate(self.config.automatic) def _handle_win32(self, config, appid): if sys.platform != 'win32':