403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/config/__pycache__/cc_update_hostname.cpython-36.pyc
3

��b��@s4dZddlZddlmZddlmZeZdd�ZdS)a-
Update Hostname
---------------
**Summary:** update hostname and fqdn

This module will update the system hostname and fqdn. If ``preserve_hostname``
is set, then the hostname will not be altered.

.. note::
    for instructions on specifying hostname and fqdn, see documentation for
    ``cc_set_hostname``

**Internal name:** ``cc_update_hostname``

**Module frequency:** always

**Supported distros:** all

**Config keys**::

    preserve_hostname: <true/false>
    prefer_fqdn_over_hostname: <true/false>
    fqdn: <fqdn>
    hostname: <fqdn/hostname>
�N)�util)�
PER_ALWAYSc	Cs�tj|dd�r|jd|�dStj|dd�}|dk	rB|jjd|�tj||�\}}y6tjj|j	d�d�}|jd||�|jj
|||�Wn&tk
r�tj|d||��YnXdS)	NZpreserve_hostnameFzWConfiguration option 'preserve_hostname' is set, not updating the hostname in module %sZprefer_fqdn_over_hostname�datazprevious-hostnamezUpdating hostname to %s (%s)z(Failed to update the hostname to %s (%s))
rZget_cfg_option_bool�debugZdistroZ
set_optionZget_hostname_fqdn�os�path�joinZ	get_cpathZupdate_hostname�	ExceptionZlogexc)	�nameZcfgZcloud�logZ_argsZ
hostname_fqdnZhostnameZfqdnZprev_fn�r�(/usr/lib/python3.6/cc_update_hostname.py�handle+s$
r)�__doc__rZ	cloudinitrZcloudinit.settingsrZ	frequencyrrrrr
�<module>!s


Youez - 2016 - github.com/yon3zu
LinuXploit