mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa client uninstall: clean the state store when restoring hostname
When ipa client was installed with the --hostname= option, it stores [network] hostname = (current hostname) in /var/lib/ipa-client/sysrestore/sysrestore.state and changes the hostname from (current hostname) to the value provided in --hostname. During uninstall, the previous hostname is restored but the entry does not get removed from sysrestore.state. As the uninstaller checks if all entries from sysrestore.state have been restored, it warns that some state has not been restored. The fix calls statestore.restore_state() instead of statestore.get_state() as this method also clears the entry. https://pagure.io/freeipa/issue/7620 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
7284097eed
commit
e32cfd14a9
@@ -392,7 +392,7 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
statestore.backup_state('network', 'hostname', old_hostname)
|
||||
|
||||
def restore_hostname(self, fstore, statestore):
|
||||
old_hostname = statestore.get_state('network', 'hostname')
|
||||
old_hostname = statestore.restore_state('network', 'hostname')
|
||||
|
||||
if old_hostname is not None:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user