File: //usr/lib/python3.9/site-packages/ipalib/__pycache__/facts.cpython-39.opt-1.pyc
a
}�f� � @ sT d Z ddlZddlZddlmZ ddlmZ e�e�Z g d�Z
dd� Zdd
d�ZdS )
z
Facts about the installation
� N� )�
sysrestore)�paths)ZhttpdZkadminZdirsrvzpki-tomcatd�installZkrb5kdcZnamedc C s� t �tj�} | �d�r"| �dd�S d}t �tj�}tD ],}| �|�rVt� d|� d}q6t� d|� q6|�
� r|t� d� d}n
t� d� |S ) z@
Use the state to determine if IPA has been configured.
�installation�completeFz%s is configuredTz%s is not configuredzfilestore has fileszfilestore is tracking no files)r � StateFiler Z
SYSRESTOREZ has_state� get_state� FileStore�IPA_MODULES�logger�debug� has_files)Zsstore� installed�fstore�module� r �0/usr/lib/python3.9/site-packages/ipalib/facts.py�is_ipa_configured s
r Fc C sP t �tj�}t �tj�}|�dd�}|dur0|S |�� pJ| oJtj� tj
�}|S )a
Consider IPA client not installed if nothing is backed up
and default.conf file does not exist. If on_master is set to True,
the existence of default.conf file is not taken into consideration,
since it has been already created by ipa-server-install.
r r N)r r
r ZIPA_CLIENT_SYSRESTOREr r r �os�path�existsZIPA_DEFAULT_CONF)Z on_masterr Z
statestorer r r r �is_ipa_client_configured3 s �r )F)
�__doc__Zloggingr � r Zipaplatform.pathsr Z getLogger�__name__r r r r r r r r �<module> s