[Freeipa-devel] [PATCH 0132] [PATCH 132/132] trusts: Always stop and disable smb service on uninstall
Petr Viktorin
pviktori at redhat.com
Tue Nov 26 14:26:15 UTC 2013
On 11/22/2013 12:01 PM, Alexander Bokovoy wrote:
> On Thu, 21 Nov 2013, Tomas Babej wrote:
>> https://fedorahosted.org/freeipa/ticket/4042
>> ---
>> ipaserver/install/adtrustinstance.py | 15 +++++++--------
>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/ipaserver/install/adtrustinstance.py
>> b/ipaserver/install/adtrustinstance.py
>> index
>> 5e3d0acbb11aae3c1a07512ec52b37fabcb0f644..2f1c99949969bd80ab14e6ae6c8145f53de17808
>> 100644
>> --- a/ipaserver/install/adtrustinstance.py
>> +++ b/ipaserver/install/adtrustinstance.py
>> @@ -881,11 +881,16 @@ class ADTRUSTInstance(service.Service):
>> if self.is_configured():
>> self.print_msg("Unconfiguring %s" % self.service_name)
>>
>> - running = self.restore_state("running")
>> - enabled = self.restore_state("enabled")
>> + # Call restore_state so that we do not leave mess in the
>> statestore
>> + # Otherwise this does nothing
>> + self.restore_state("running")
>> + self.restore_state("enabled")
>>
>> + # Always try to stop and disable smb service, since we do not
>> leave
>> + # working configuration after uninstall
>> try:
>> self.stop()
>> + self.disable()
>> except:
>> pass
>>
>> @@ -917,9 +922,3 @@ class ADTRUSTInstance(service.Service):
>>
>> # Remove our keys from samba's keytab
>> self.clean_samba_keytab()
>> -
>> - if not enabled is None and not enabled:
>> - self.disable()
>> -
>> - if not running is None and running:
>> - self.start()
> ACK
>
Pushed to
master: d361e12ae55f391a13b613a7220c164f503954cc
ipa-3-3: 6680572ad5c1419f094335c9f82a0e3763bf883e
--
Petr³
More information about the Freeipa-devel
mailing list