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 :  /usr/lib/python2.7/site-packages/cloudinit/config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pyo
�
oB�]c@s�dZddlZyddlmZWn!ek
rIddlmZnXddlZddlmZddgZd�Z	d�Z
d	�Zd
�ZdS(s�
Yum Add Repo
------------
**Summary:** add yum repository configuration to the system

Add yum repository configuration to ``/etc/yum.repos.d``. Configuration files
are named based on the dictionary key under the ``yum_repos`` they are
specified with. If a config file already exists with the same name as a config
entry, the config entry will be skipped.

**Internal name:** ``cc_yum_add_repo``

**Module frequency:** per always

**Supported distros:** fedora, rhel

**Config keys**::

    yum_repos:
        <repo-name>:
            baseurl: <repo url>
            name: <repo name>
            enabled: <true/false>
            # any repository configuration options (see man yum.conf)
i����N(tConfigParser(tutiltfedoratrhelcCs.|j�jdd�}|jdd�}|S(Nt-t_t (tlowertreplace(trepo_id((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pyt_canonicalize_id.scCszt|t�rtt|��St|ttf�rZdjg|D]}t|�^qA�St|tj	�svt|�S|S(Ns
(
t
isinstancetbooltstrtinttlistttupletjoint_format_repo_valuetsixtstring_types(tvaltv((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pyR4s&
cCs�t�}|j|�x3|j�D]%\}}|j||t|��q#Wtj�}|j|�|jd�|j	�}|j
ddtj��dj
|�S(Nis# Created by cloud-init on %s
t(Rtadd_sectiontitemstsetRRtStringIOtwritetseekt	readlinestinsertRttime_rfc2822R(R	trepo_configtto_betkRtto_be_streamtlines((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pyt_format_repository_configCs	


cCs|jd�}|s)|jd|�dStj|dd�}i}i}xn|j�D]`\}	}
t|	�}tjj|d|�}tjj	|�r�|j
d|	|�qWn%||kr�|j
d|	|�qWn|
s�i}
ni}
xK|
j�D]=\}}|j�j�j
dd	�}|r�||
|<q�q�W|
}
d
}x=dgD]2}||
krQ|jd|	|�|d
7}qQqQW|s�|
||<|||<qW|jd|	|�qWWxB|j�D]4\}}t||j|��}tj||�q�WdS(Nt	yum_reposs<Skipping module named %s, no 'yum_repos' configuration foundtyum_repo_dirs/etc/yum.repos.d/s%s.repos)Skipping repo %s, file %s already exists!s*Skipping repo %s, file %s already pending!RRitbaseurlsBRepository %s does not contain a %s configuration 'required' entryis6Repository %s is missing %s required fields, skipping!(tgettdebugRtget_cfg_option_strRR
tostpathRtexiststinfoRtstripRtwarningR&t
write_file(tnametcfgt_cloudtlogt_argstrepostrepo_base_pathtrepo_locationstrepo_configsR	R!t
canon_repo_idtrepo_fn_ptht
n_repo_configR#Rtmissing_requiredt	req_fieldt	c_repo_idR.t	repo_blob((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pythandleSsV			
	
		


	(
t__doc__R-tconfigparserRtImportErrorRt	cloudinitRtdistrosR
RR&RD(((sD/usr/lib/python2.7/site-packages/cloudinit/config/cc_yum_add_repo.pyt<module>s
			

Youez - 2016 - github.com/yon3zu
LinuXploit