Bug 11990 - Add encryption properties to db.properties during install

better help message
This commit is contained in:
frank 2011-11-23 17:32:45 -08:00
parent cb473b29e9
commit 7402ff0b8c
1 changed files with 18 additions and 10 deletions

View File

@ -69,9 +69,10 @@ class DBDeployer(object):
def cleanOrRecoverDbDotProperties():
dbpPath = os.path.join(self.dbConfPath, 'db.properties')
copyPath = os.path.join(self.dbConfPath, 'db.properties.origin')
if not self.success:
shutil.copy2(copyPath, dbpPath)
os.remove(copyPath)
if os.path.isfile(copyPath):
if not self.success:
shutil.copy2(copyPath, dbpPath)
os.remove(copyPath)
cleanOrRecoverDbDotProperties()
@ -179,13 +180,20 @@ Sql parameters:
def errorAndExit(self, msg):
self.postRun()
if self.parser != None:
self.parser.error(msg)
else:
sys.stderr.write(msg)
sys.stderr.flush()
sys.exit(1)
err = '''\n\nWe apologize for below error:
***************************************************************
%s
***************************************************************
Please run:
cloud-setup-database -h
for full help
''' % msg
sys.stderr.write(err)
sys.stderr.flush()
sys.exit(1)
def setupDBSchema(self):
if not self.rootuser:
self.info("No mysql root user specified, will not create Cloud DB schema\n", None)