403Webshell
Server IP : 156.238.232.47  /  Your IP : 216.73.216.150
Web Server : nginx/1.25.3
System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : www ( 1000)
PHP Version : 8.3.25
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/cloudinit/config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/site-packages/cloudinit/config/cc_set_hostname.pyo
�
oB�]c@sUdZddlZddlmZddlmZdefd��YZd�ZdS(s 
Set Hostname
------------
**Summary:** set hostname and fqdn

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

A hostname and fqdn can be provided by specifying a full domain name under the
``fqdn`` key. Alternatively, a hostname can be specified using the ``hostname``
key, and the fqdn of the cloud wil be used. If a fqdn specified with the
``hostname`` key, it will be handled properly, although it is better to use
the ``fqdn`` config key. If both ``fqdn`` and ``hostname`` are set, ``fqdn``
will be used.

**Internal name:** ``cc_set_hostname``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    preserve_hostname: <true/false>
    fqdn: <fqdn>
    hostname: <fqdn/hostname>
i����N(t
write_json(tutiltSetHostnameErrorcBseZdZRS(s�Raised when the distro runs into an exception when setting hostname.

    This may happen if we attempt to set the hostname early in cloud-init's
    init-local timeframe as certain services may not be running yet.
    (t__name__t
__module__t__doc__(((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_set_hostname.pyR,scCshtj|dt�r)|jd|�dStj||�\}}tjj|jd�d�}i}tjj	|�r�tj
tj|��}n||jd�kp�||jd�k}	|	s�|jd�dS|jd||�y|j
j||�WnItk
rH}
d	||f}tj||�td
||
f��nXt|i|d6|d6�dS(Ntpreserve_hostnamesVConfiguration option 'preserve_hostname' is set, not setting the hostname in module %stdatasset-hostnamethostnametfqdns*No hostname changes. Skipping set-hostnamesSetting the hostname to %s (%s)s%Failed to set the hostname to %s (%s)s%s: %s(Rtget_cfg_option_booltFalsetdebugtget_hostname_fqdntostpathtjoint	get_cpathtexistst	load_jsont	load_filetgettdistrotset_hostnamet	ExceptiontlogexcRR(tnametcfgtcloudtlogt_argsRR	tprev_fnt
prev_hostnamethostname_changedtetmsg((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_set_hostname.pythandle5s,	
(	RRtcloudinit.atomic_helperRt	cloudinitRRRR$(((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_set_hostname.pyt<module>#s
	

Youez - 2016 - github.com/yon3zu
LinuXploit