mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
uninstall: Don't fail on missing /var/lib/samba
On some distros freeipa-server package may not depend on `/var/lib/samba` directory. In this case an uninstallation of ipaserver fails. Fixes: https://pagure.io/freeipa/issue/8461 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
b9ae7c45b8
commit
89d86dac0a
@ -899,10 +899,11 @@ class ADTRUSTInstance(service.Service):
|
||||
ipautil.remove_file(self.smb_conf)
|
||||
|
||||
# Remove samba's persistent and temporary tdb files
|
||||
tdb_files = [tdb_file for tdb_file in os.listdir(paths.SAMBA_DIR)
|
||||
if tdb_file.endswith(".tdb")]
|
||||
for tdb_file in tdb_files:
|
||||
ipautil.remove_file(tdb_file)
|
||||
if os.path.isdir(paths.SAMBA_DIR):
|
||||
tdb_files = [tdb_file for tdb_file in os.listdir(paths.SAMBA_DIR)
|
||||
if tdb_file.endswith(".tdb")]
|
||||
for tdb_file in tdb_files:
|
||||
ipautil.remove_file(tdb_file)
|
||||
|
||||
# Remove our keys from samba's keytab
|
||||
self.clean_samba_keytab()
|
||||
|
Loading…
Reference in New Issue
Block a user