diff options
-rw-r--r-- | freeipa.spec.in | 2 | ||||
-rwxr-xr-x | install/tools/ipa-ldap-updater | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in index deeb3341b..710631091 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -465,7 +465,7 @@ fi %posttrans server # This must be run in posttrans so that updates from previous # execution that may no longer be shipped are not applied. -/usr/sbin/ipa-ldap-updater --upgrade >/dev/null 2>&1 || : +/usr/sbin/ipa-ldap-updater --upgrade >/dev/null || : %preun server if [ $1 = 0 ]; then diff --git a/install/tools/ipa-ldap-updater b/install/tools/ipa-ldap-updater index 197b840b0..8f5c76645 100755 --- a/install/tools/ipa-ldap-updater +++ b/install/tools/ipa-ldap-updater @@ -96,10 +96,15 @@ def main(): run_plugins = True if os.getegid() == 0: - installutils.check_server_configuration() + try: + installutils.check_server_configuration() + except RuntimeError, e: + print unicode(e) + sys.exit(1) else: if not os.path.exists('/etc/ipa/default.conf'): - sys.exit("IPA is not configured on this system.") + print "IPA is not configured on this system." + sys.exit(1) if options.upgrade: sys.exit('Upgrade can only be done as root') if run_plugins: @@ -115,10 +120,13 @@ def main(): if dirman_password is None: sys.exit("\nDirectory Manager password required") + console_format = '%(levelname)s: %(message)s' if options.upgrade: - standard_logging_setup('/var/log/ipaupgrade.log', verbose=True, debug=options.debug, filemode='a') + standard_logging_setup('/var/log/ipaupgrade.log', debug=options.debug, + console_format=console_format, filemode='a') else: - standard_logging_setup(None, verbose=True, debug=options.debug) + standard_logging_setup(None, console_format=console_format, + debug=options.debug) cfg = dict ( in_server=True, |