403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/cloudinit/config/__pycache__/cc_apk_configure.cpython-39.pyc
a

'�Dg��@s�UdZddlZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
e�e�ZdZd	Zd
dge
dgd
�Zeed<ee	eedd�dd�Zdd�ZdS)z0Apk Configure: Configures apk repositories file.�N)�
temp_utils�	templater�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCEz+https://alpine.global.ssl.fastly.net/alpinea## template:jinja
#
# Created by cloud-init
#
# This file is written on first boot of an instance
#

{{ alpine_baseurl }}/{{ alpine_version }}/main
{% if community_enabled -%}
{{ alpine_baseurl }}/{{ alpine_version }}/community
{% endif -%}
{% if testing_enabled -%}
{% if alpine_version != 'edge' %}
#
# Testing - using with non-Edge installation may cause problems!
#
{% endif %}
{{ alpine_baseurl }}/edge/testing
{% endif %}
{% if local_repo != '' %}

#
# Local repo
#
{{ local_repo }}/{{ alpine_version }}
{% endif %}

Zcc_apk_configureZalpine�	apk_repos)�idZdistrosZ	frequencyZactivate_by_schema_keys�meta)�name�cfg�cloud�args�returncCs�|�d�}|st�d|�dSt�|dd�r<t�d|�dS|�d�}|sZt�d|�dS|�d	�}|sxt�d
|�dS|�dd�}t|||�dS)
a{
    Call to handle apk_repos sections in cloud-config file.

    @param name: The module name "apk_configure" from cloud.cfg
    @param cfg: A nested dict containing the entire cloud config contents.
    @param cloud: The CloudInit object in use.
    @param log: Pre-initialized Python logger object to use for logging.
    @param _args: Any module arguments from cloud.cfg
    r	z6Skipping module named %s, no 'apk_repos' section foundNZpreserve_repositoriesFz8Skipping module named %s, 'preserve_repositories' is set�alpine_repoz>Skipping module named %s, no 'alpine_repo' configuration found�versionz@Skipping module named %s, 'version' not specified in alpine_repoZlocal_repo_base_url�)�get�LOG�debugrZget_cfg_option_bool�_write_repositories_file)rr
rrZapk_sectionr�alpine_version�
local_repo�r�E/usr/lib/python3.9/site-packages/cloudinit/config/cc_apk_configure.py�handle>s6
��
�
�rcCsxd}|�dt�}|||�d�|�d�|d�}tjddd�}|d	}tj|td
�t�d|�t	�
|||�t�|�dS)
a
    Write the /etc/apk/repositories file with the specified entries.

    @param alpine_repo: A nested dict of the alpine_repo configuration.
    @param alpine_version: A string of the Alpine version to use.
    @param local_repo: A string containing the base URL of a local repo.
    z/etc/apk/repositoriesZbase_url�community_enabled�testing_enabled)�alpine_baseurlrrrrztemplate_name-z.tmpl)�prefix�suffix�)Zcontentz3Generating Alpine repository configuration file: %sN)r�DEFAULT_MIRRORrZmkstemprZ
write_file�REPOSITORIES_TEMPLATErrrZrender_to_fileZdel_file)rrrZ	repo_filer�paramsZtfileZtemplate_fnrrrrss	�r)�__doc__ZloggingZ	cloudinitrrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrZ	getLogger�__name__rr#r$r�__annotations__�str�listrrrrrr�<module>s 
�5

Youez - 2016 - github.com/yon3zu
LinuXploit