diff options
-rw-r--r-- | freeipa.spec.in | 5 | ||||
-rw-r--r-- | install/tools/ipa-upgradeconfig | 15 | ||||
-rw-r--r-- | install/tools/man/ipa-upgradeconfig.8 | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in index 060f09b12..916630029 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -493,7 +493,7 @@ if [ $1 = 1 ]; then fi %endif if [ $1 -gt 1 ] ; then - /usr/sbin/ipa-upgradeconfig >/dev/null 2>&1 || : + /usr/sbin/ipa-upgradeconfig --quiet >/dev/null || : fi %posttrans server @@ -815,6 +815,9 @@ fi %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt %changelog +* Wed Oct 17 2012 Martin Kosek <mkosek@redhat.com> - 2.99.0-51 +- Print ipa-upgradeconfig errors during RPM update + * Wed Oct 10 2012 Alexander Bokovoy <abokovoy@redhat.com> - 2.99.0-50 - Make sure server-trust-ad subpackage alternates winbind_krb5_locator.so plugin to /dev/null since they cannot be used when trusts are configured diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig index 384261498..14d4e0829 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 740ec554a..43e2ab90e 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 |