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_resolv_conf.pyc
�
oB�]c@s�dZddlmZddlmZddlmZddlmZeje	�Z
eZdddd	gZd
d�Z
d�Zd
S(sf
Resolv Conf
-----------
**Summary:** configure resolv.conf

This module is intended to manage resolv.conf in environments where early
configuration of resolv.conf is necessary for further bootstrapping and/or
where configuration management such as puppet or chef own dns configuration.
As Debian/Ubuntu will, by default, utilize resovlconf, and similarly RedHat
will use sysconfig, this module is likely to be of little use unless those
are configured correctly.

.. note::
    For RedHat with sysconfig, be sure to set PEERDNS=no for all DHCP
    enabled NICs.

.. note::
    And, in Ubuntu/Debian it is recommended that DNS be configured via the
    standard /etc/network/interfaces configuration file.

**Internal name:** ``cc_resolv_conf``

**Module frequency:** per instance

**Supported distros:** fedora, rhel, sles

**Config keys**::

    manage_resolv_conf: <true/false>
    resolv_conf:
        nameservers: ['8.8.4.4', '8.8.8.8']
        searchdomains:
            - foo.example.com
            - bar.example.com
        domain: example.com
        options:
            rotate: <true/false>
            timeout: 1
i����(tlog(tPER_INSTANCE(t	templater(tutiltfedoratopensusetrheltsless/etc/resolv.confcCs�g}g}d|krqxV|dj�D]A\}}t|t�r)|rZ|j|�qj|j|�q)q)Wnx||D]}|d|=q|W|jd�s�i|d<n||d<tjd|�tj|||�dS(Ntoptionstflagss$Writing resolv.conf from template %s(	titemst
isinstancetbooltappendtgettLOGtdebugRtrender_to_file(ttemplate_fntparamsttarget_fnameR	tfalse_flagstkeytvaltflag((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_resolv_conf.pytgenerate_resolv_conf=s

cCs�d|kr |jd|�dStj|dt�sI|jd|�dSd|kre|jd�n|jd�}|s�|jd�dStd	|d
|d�dS(s[
    Handler for resolv.conf

    @param name: The module name "resolv-conf" from cloud.cfg
    @param cfg: A nested dict containing the entire cloud config contents.
    @param cloud: The L{CloudInit} object in use.
    @param log: Pre-initialized Python logger object to use for logging.
    @param args: Any module arguments from cloud.cfg
    tmanage_resolv_confsFSkipping module named %s, no 'manage_resolv_conf' key in configurationNsGSkipping module named %s, 'manage_resolv_conf' present but set to Falsetresolv_confs3manage_resolv_conf True but no parameters provided!sresolv.confs1No template found, not rendering /etc/resolv.confRR(RRtget_cfg_option_booltFalsetwarningtget_template_filenameR(tnametcfgtcloudRt_argsR((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_resolv_conf.pythandleTs 
		
N(t__doc__t	cloudinitRtloggingtcloudinit.settingsRRRt	getLoggert__name__Rt	frequencytdistrosRR$(((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_resolv_conf.pyt<module>/s

Youez - 2016 - github.com/yon3zu
LinuXploit