File: //proc/self/root/usr/lib/python3.6/site-packages/ipalib/__pycache__/facts.cpython-36.pyc
3
�d[e� � @ s^ d Z ddlZddlZddlmZ ddlmZ eje�Z dddd d
ddgZ
d
d� Zddd�ZdS )z
Facts about the installation
� N� )�
sysrestore)�pathsZhttpdZkadminZdirsrvzpki-tomcatdZinstallZkrb5kdcZnamedc C s� t jtj�} | jd�r"| jdd�S d}t jtj�}x4tD ],}| j|�rXtj d|� d}q8tj d|� q8W |j
� r�tj d� d}n
tj 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 �/usr/lib/python3.6/facts.py�is_ipa_configured s
r Fc C sP t jtj�}t jtj�}|jdd�}|dk r0|S |j� pJ| oJtjj 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