%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/cc_update_hostname.cpython-39.pyc

a

'�Dg��@s�UdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZdd	gegd
�Z
e
ed<e�e�Zeeeedd�d
d�ZdS)z)Update Hostname: Update hostname and fqdn�N)�util)�Cloud)�Config)�
MetaSchema)�
PER_ALWAYSZcc_update_hostname�all)�idZdistrosZ	frequencyZactivate_by_schema_keys�meta)�name�cfg�cloud�args�returnc
	Cs�t�|dd�rt�d|�dSt�|dd�}|durB|j�d|�t�|dd�}|durf|j�d|�t�||�\}}}|r�|dkr�t�d�dSz6tj�	|�
d�d	�}	t�d
||�|j�|||	�Wn$ty�t�
td||��Yn0dS)NZpreserve_hostnameFzWConfiguration option 'preserve_hostname' is set, not updating the hostname in module %sZprefer_fqdn_over_hostname�create_hostname_fileZ	localhostz6Hostname is localhost. Let other services handle this.�datazprevious-hostnamezUpdating hostname to %s (%s)z(Failed to update the hostname to %s (%s))rZget_cfg_option_bool�LOG�debugZdistroZ
set_optionZget_hostname_fqdn�os�path�joinZ	get_cpathZupdate_hostname�	ExceptionZlogexc)
r
rrr
Z
hostname_fqdnr�hostnameZfqdnZ
is_defaultZprev_fn�r�G/usr/lib/python3.9/site-packages/cloudinit/config/cc_update_hostname.py�handles:���
�r)�__doc__ZloggingrZ	cloudinitrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrr	�__annotations__Z	getLogger�__name__r�str�listrrrrr�<module>	s�


Zerion Mini Shell 1.0