404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.118.151.112: ~ $
3

\�me�!�@sdddlZddlZddlmZmZmZmZddlmZddl	m
Z
eje�Z
dZGdd�dej�ZdS)�N)�distros�helpers�subp�util)�HostnameConf)�PER_INSTANCEa7# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}

c@s�eZdZdZdZdZdZdeed�iZdd�Z	d	d
�Z
d0dd
�Zej
d�dd�Zdd�Zdd�Zdd�Zd1dd�Zdd�Zeeeed�dd�Zdd�Zd2d d!�Zd"d#�Zed$d%��Zd3d(d)�Zed*d+��Zedd,�eeed-�d.d/��ZdS)4�Distrozpy3-pipz/usr/share/bkeymaps/z&/etc/profile.d/50-cloud-init-locale.shz/etc/network/interfacesZeni)Zeni_pathZ
eni_headercCs6tjj||||�tj|�|_d|_d|_d|d<dS)NzC.UTF-8ZalpineZsshdZssh_svcname)rr�__init__rZRunners�_runner�default_localeZosfamily)�self�nameZcfg�paths�r�/usr/lib/python3.6/alpine.pyr	%s
zDistro.__init__cCs|jS)zgThe default locale for Alpine Linux is different than
        cloud-init's DataSource default.
        )r)rrrr�
get_locale/szDistro.get_localeNcCsB|s
|j}|s|j}ddddd|ddg}tj|dj|�d�dS)	N�#z?# This file is created by cloud-init once per new instance bootzexport CHARSET=UTF-8zexport LANG=%szexport LC_COLLATE=C��
i�)r�locale_conf_fnr�
write_file�join)rZlocaleZout_fn�linesrrr�apply_locale5szDistro.apply_locale)�pkglistcCs|j�|jd|d�dS)N�add)�pkgs)�update_package_sources�package_command)rrrrr�install_packagesHszDistro.install_packagescCsnd}y|j|�}Wn.tk
r@tj|jdd�}|r8ndSYnX|sNtd�}|j|�tj|t|�d�dS)N�create_hostname_fileTri�)	�_read_hostname_conf�IOErrorrZget_cfg_option_boolZ_cfgrZset_hostnamer�str)r�hostname�filename�confr rrr�_write_hostnameLs

zDistro._write_hostnamecCs|j|j�}|j|fS)N)�_read_hostnameZhostname_conf_fn)rZsys_hostnamerrr�_read_system_hostname_szDistro._read_system_hostnamecCsttj|��}|j�|S)N)rrZ	load_file�parse)rr%r&rrrr!cszDistro._read_hostname_confcCs:d}y|j|�}|j}Wntk
r,YnX|s6|S|S)N)r!r$r")rr%�defaultr$r&rrrr(hs

zDistro._read_hostnamecCsdS)Nz	127.0.1.1r)rrrr�_get_localhost_ipsszDistro._get_localhost_ip)�layout�model�variant�optionscCs�|sd}tj|�t|��tjj|j|�}tjj|�sPd|}tj|�t|��|sjd}tj|�t|��tjj|d|�}tjj|�s�d|}tj|�t|��|r�tj	d�|r�tj	d�t
j
d||g�dS)	NzKeyboard layout not specified.z,Keyboard layout directory %s does not exist.zKeyboard variant not specified.z
%s.bmap.gzz(Keyboard variant file %s does not exist.z+Keyboard model is ignored for Alpine Linux.z.Keyboard options are ignored for Alpine Linux.zsetup-keymap)�LOG�error�RuntimeError�os�pathr�keymap_path�isdir�isfileZwarningr)rr-r.r/r0�msgZkeymap_layout_pathZkeymap_variant_pathrrr�
set_keymapvs4





zDistro.set_keymapcCstj||j|�d�dS)N)�tzZtz_file)rZset_etc_timezoneZ
_find_tz_file)rr;rrr�set_timezone�szDistro.set_timezonecCs�|dkrg}dg}|jd�|r6t|t�r6|j|�n|rNt|t�rN|j|�|r\|j|�|dkrr|jddg�tjd|�}|j|�tj|dd�dS)	NZapkz--quietZupgradez--update-cachez--availablez%s-%sF)�capture)�append�
isinstancer#�list�extendrZexpand_package_listr)r�command�argsr�cmdrrrrr�s



zDistro.package_commandcCs|jjd|jdgtd�dS)Nzupdate-sources�update)Zfreq)r
Zrunrr)rrrrr�s
zDistro.update_package_sourcescCs|jsddg|_|jS)z7Allow distro to determine the preferred ntp client listZchronyZntp)Z_preferred_ntp_clients)rrrr�preferred_ntp_clients�s
zDistro.preferred_ntp_clients�poweroff�nowcCsn|dg}|dkr|dg7}nNy|jtt|�d��Wn2tk
rh}ztd|f�|�WYdd}~XnX|S)Nz-drH�0�<z?power_state[delay] must be 'now' or '+m' (minutes). found '%s'.)r>r#�int�
ValueError�	TypeError)r�modeZdelay�messagerB�errr�shutdown_command�szDistro.shutdown_commandcCsdS)z1
        Alpine uses OpenRC, not systemd
        Frrrrr�uses_systemd�szDistro.uses_systemd)�rcs)�action�service�
extra_argsc	
Gs�ddg}ddg}t|�|dgt|�|dgt|�d|gt|�d|gt|�|dgt|�|dgt|�|dgt|�|d	gd
�}t||�}tj|d|d�S)
a<
        Perform the requested action on a service. This handles OpenRC
        specific implementation details.

        OpenRC has two distinct commands relating to services,
        'rc-service' and 'rc-update' and the order of their argument
        lists differ.
        May raise ProcessExecutionError
        z
rc-servicez	--nocolorz	rc-update�stop�start�delr�restart�status)rWrX�disable�enablerZ�reloadz
try-reloadr[T)r=rS)r@r)	rrTrUrSrVZinit_cmdZ
update_cmdZcmdsrDrrr�manage_service�s
zDistro.manage_service)N)N)NN)rGrHN) �__name__�
__module__�__qualname__Zpip_package_namer6rZnetwork_conf_fn�NETWORK_FILE_HEADERZrenderer_configsr	rrrZPackageListrr'r)r!r(r,r#r:r<rr�propertyrFrQ�staticmethodrR�classmethodr_rrrrrs.


"

r)Zloggingr4Z	cloudinitrrrrZ"cloudinit.distros.parsers.hostnamerZcloudinit.settingsrZ	getLoggerr`r1rcrrrrr�<module>	s
	

Filemanager

Name Type Size Permission Actions
OpenCloudOS.cpython-36.opt-1.pyc File 542 B 0644
OpenCloudOS.cpython-36.pyc File 542 B 0644
TencentOS.cpython-36.opt-1.pyc File 540 B 0644
TencentOS.cpython-36.pyc File 540 B 0644
__init__.cpython-36.opt-1.pyc File 35.6 KB 0644
__init__.cpython-36.pyc File 35.6 KB 0644
almalinux.cpython-36.opt-1.pyc File 313 B 0644
almalinux.cpython-36.pyc File 313 B 0644
alpine.cpython-36.opt-1.pyc File 6.78 KB 0644
alpine.cpython-36.pyc File 6.78 KB 0644
amazon.cpython-36.opt-1.pyc File 450 B 0644
amazon.cpython-36.pyc File 450 B 0644
arch.cpython-36.opt-1.pyc File 7.33 KB 0644
arch.cpython-36.pyc File 7.33 KB 0644
bsd.cpython-36.opt-1.pyc File 4.87 KB 0644
bsd.cpython-36.pyc File 4.87 KB 0644
bsd_utils.cpython-36.opt-1.pyc File 1.09 KB 0644
bsd_utils.cpython-36.pyc File 1.09 KB 0644
centos.cpython-36.opt-1.pyc File 310 B 0644
centos.cpython-36.pyc File 310 B 0644
cloudlinux.cpython-36.opt-1.pyc File 314 B 0644
cloudlinux.cpython-36.pyc File 314 B 0644
cos.cpython-36.opt-1.pyc File 309 B 0644
cos.cpython-36.pyc File 309 B 0644
debian.cpython-36.opt-1.pyc File 7.52 KB 0644
debian.cpython-36.pyc File 7.52 KB 0644
dragonflybsd.cpython-36.opt-1.pyc File 361 B 0644
dragonflybsd.cpython-36.pyc File 361 B 0644
eurolinux.cpython-36.opt-1.pyc File 313 B 0644
eurolinux.cpython-36.pyc File 313 B 0644
fedora.cpython-36.opt-1.pyc File 310 B 0644
fedora.cpython-36.pyc File 310 B 0644
freebsd.cpython-36.opt-1.pyc File 6.21 KB 0644
freebsd.cpython-36.pyc File 6.21 KB 0644
gentoo.cpython-36.opt-1.pyc File 6.91 KB 0644
gentoo.cpython-36.pyc File 6.91 KB 0644
mariner.cpython-36.opt-1.pyc File 1.54 KB 0644
mariner.cpython-36.pyc File 1.54 KB 0644
miraclelinux.cpython-36.opt-1.pyc File 316 B 0644
miraclelinux.cpython-36.pyc File 316 B 0644
net_util.cpython-36.opt-1.pyc File 1.84 KB 0644
net_util.cpython-36.pyc File 1.84 KB 0644
netbsd.cpython-36.opt-1.pyc File 4.58 KB 0644
netbsd.cpython-36.pyc File 4.58 KB 0644
networking.cpython-36.opt-1.pyc File 12.21 KB 0644
networking.cpython-36.pyc File 12.21 KB 0644
openbsd.cpython-36.opt-1.pyc File 2.26 KB 0644
openbsd.cpython-36.pyc File 2.26 KB 0644
openeuler.cpython-36.opt-1.pyc File 538 B 0644
openeuler.cpython-36.pyc File 538 B 0644
openmandriva.cpython-36.opt-1.pyc File 318 B 0644
openmandriva.cpython-36.pyc File 318 B 0644
opensuse-leap.cpython-36.opt-1.pyc File 321 B 0644
opensuse-leap.cpython-36.pyc File 321 B 0644
opensuse-microos.cpython-36.opt-1.pyc File 324 B 0644
opensuse-microos.cpython-36.pyc File 324 B 0644
opensuse-tumbleweed.cpython-36.opt-1.pyc File 327 B 0644
opensuse-tumbleweed.cpython-36.pyc File 327 B 0644
opensuse.cpython-36.opt-1.pyc File 6.28 KB 0644
opensuse.cpython-36.pyc File 6.28 KB 0644
photon.cpython-36.opt-1.pyc File 4.31 KB 0644
photon.cpython-36.pyc File 4.31 KB 0644
rhel.cpython-36.opt-1.pyc File 4.82 KB 0644
rhel.cpython-36.pyc File 4.82 KB 0644
rhel_util.cpython-36.opt-1.pyc File 969 B 0644
rhel_util.cpython-36.pyc File 969 B 0644
rocky.cpython-36.opt-1.pyc File 309 B 0644
rocky.cpython-36.pyc File 309 B 0644
sle-micro.cpython-36.opt-1.pyc File 317 B 0644
sle-micro.cpython-36.pyc File 317 B 0644
sle_hpc.cpython-36.opt-1.pyc File 315 B 0644
sle_hpc.cpython-36.pyc File 315 B 0644
sles.cpython-36.opt-1.pyc File 312 B 0644
sles.cpython-36.pyc File 312 B 0644
suse.cpython-36.opt-1.pyc File 312 B 0644
suse.cpython-36.pyc File 312 B 0644
ubuntu.cpython-36.opt-1.pyc File 1.45 KB 0644
ubuntu.cpython-36.pyc File 1.45 KB 0644
ug_util.cpython-36.opt-1.pyc File 3.91 KB 0644
ug_util.cpython-36.pyc File 3.91 KB 0644
virtuozzo.cpython-36.opt-1.pyc File 313 B 0644
virtuozzo.cpython-36.pyc File 313 B 0644