diff options
Diffstat (limited to 'install/tools')
-rw-r--r-- | install/tools/ipa-upgradeconfig | 15 | ||||
-rw-r--r-- | install/tools/man/ipa-upgradeconfig.8 | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig index 38426149..14d4e082 100644 --- a/install/tools/ipa-upgradeconfig +++ b/install/tools/ipa-upgradeconfig @@ -61,6 +61,9 @@ def parse_options(): parser = IPAOptionParser(version=version.VERSION) parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False, help="print debugging information") + parser.add_option("-q", "--quiet", dest="quiet", + action="store_true", + default=False, help="Output only errors") options, args = parser.parse_args() safe_options = parser.get_safe_opts(options) @@ -577,9 +580,15 @@ def main(): safe_options, options = parse_options() - standard_logging_setup('/var/log/ipaupgrade.log', verbose=True, - debug=options.debug, console_format='%(message)s', - filemode='a') + verbose = not options.quiet + if options.debug: + console_format = '%(levelname)s: %(message)s' + else: + console_format = '%(message)s' + + standard_logging_setup('/var/log/ipaupgrade.log', debug=options.debug, + verbose=verbose, console_format=console_format, filemode='a') + root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options)) fstore = sysrestore.FileStore('/var/lib/ipa/sysrestore') diff --git a/install/tools/man/ipa-upgradeconfig.8 b/install/tools/man/ipa-upgradeconfig.8 index 740ec554..43e2ab90 100644 --- a/install/tools/man/ipa-upgradeconfig.8 +++ b/install/tools/man/ipa-upgradeconfig.8 @@ -30,8 +30,12 @@ It also will convert a CA configured to be accessible via ports 9443, 9444, 9445 This is not intended to be run by an end\-user. It is executed when the IPA rpms are upgraded. This must be run as the root user. .SH "OPTIONS" +.TP \fB\-d\fR, \fB\-\-debug\fR Enable debug logging when more verbose output is needed +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Output only errors .SH "EXIT STATUS" 0 if the update was successful or there was nothing to do |