Fix ipa-client-install --uninstall crash

Fix ipa-client-install crash when chronyd service fails to start.

https://fedorahosted.org/freeipa/ticket/4273

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
David Kupka 2014-07-08 07:36:48 +02:00 committed by Petr Viktorin
parent 1e58588ec2
commit 2ff14607b1

View File

@ -692,7 +692,10 @@ def uninstall(options, env):
if restored:
services.knownservices.ntpd.restart()
ipaclient.ntpconf.restore_forced_ntpd(statestore)
try:
ipaclient.ntpconf.restore_forced_ntpd(statestore)
except CalledProcessError, e:
root_logger.error('Failed to start chronyd: %s', e)
if was_sshd_configured and services.knownservices.sshd.is_running():
services.knownservices.sshd.restart()