mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Log contents of files created or modified by IPAChangeConf
This will show the status of the files during an installation. This is particularly important during a replica install where default.conf gets written several times. Fixes: https://pagure.io/freeipa/issue/7218 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
parent
21b09522b5
commit
79432cbdc6
@ -19,6 +19,7 @@
|
||||
#
|
||||
|
||||
import fcntl
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
|
||||
@ -27,6 +28,8 @@ import six
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def openLocked(filename, perms):
|
||||
fd = -1
|
||||
try:
|
||||
@ -506,6 +509,8 @@ class IPAChangeConf(object):
|
||||
f.close()
|
||||
except IOError:
|
||||
pass
|
||||
logger.debug("Updating configuration file %s", file)
|
||||
logger.debug(output)
|
||||
return True
|
||||
|
||||
def newConf(self, file, options, file_perms=0o644):
|
||||
@ -541,6 +546,8 @@ class IPAChangeConf(object):
|
||||
f.close()
|
||||
except IOError:
|
||||
pass
|
||||
logger.debug("Writing configuration file %s", file)
|
||||
logger.debug(output)
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user