404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.147.53.214: ~ $
3

\�me��@spddlZddlZddlmZmZmZmZddlmZm	Z	ddl
mZddlm
Z
eje�ZGdd�dej�ZdS)�N)�distros�helpers�subp�util)�PackageList�	rhel_util)�HostnameConf)�PER_INSTANCEc@s�eZdZdZdZdZdZdZdZdZ	dZ
dZd	d
ddd
d�d�iZdZ
dd�Zed�dd�Zdd�Zd*dd�Zd+dd�Zdd�Zd d!�Zd,d"d#�Zd$d%�Zd-d&d'�Zd(d)�ZdS).�Distroz/etc/sysconfig/clockz/etc/sysconfig/i18nz/etc/locale.confz/etc/sysconfig/networkz
/etc/hostnamez'/etc/sysconfig/network-scripts/ifcfg-%sz/etc/localtimez/usr/libexec�	sysconfigzetc/sysconfig/networkz'%(base)s/network-scripts/ifcfg-%(name)sz'%(base)s/network-scripts/route-%(name)sz(%(base)s/network-scripts/route6-%(name)s)Zipv4Zipv6)ZcontrolZiface_templatesZroute_templatesTcCs<tjj||||�tj|�|_d|_d|_d|_d|d<dS)NZredhatzen_US.UTF-8ZsshdZssh_svcname)	rr
�__init__rZRunners�_runnerZosfamily�default_locale�
system_locale)�self�nameZcfg�paths�r�/usr/lib/python3.6/rhel.pyr/szDistro.__init__)�pkglistcCs|jd|d�dS)NZinstall)�pkgs)�package_command)rrrrr�install_packages:szDistro.install_packagescCs"|js|j�|_|jr|jS|jS)z8Return the default locale if set, else use system locale)r�_read_system_localer)rrrr�
get_locale=s
zDistro.get_localeNcCs6|j�r|s|j}n
|s|j}d|i}tj||�dS)N�LANG)�uses_systemd�systemd_locale_conf_fn�locale_conf_fnr�update_sysconfig_file)rZlocaleZout_fnZ
locale_cfgrrr�apply_localeIszDistro.apply_localercCsX|j�r|j}n|j}|s&td|��tjj|�rTtj|�\}}||krP||SdSdS)z.Read system default locale setting, if presentzInvalid path: %sN)	rrr�
ValueError�os�path�existsr�read_sysconfig_file)rZkeynameZ	locale_fn�_exists�contentsrrrrUszDistro._read_system_localecCs�|j�r8|jd�r8td�}|j|�tj|t|�d�n^|j�r�tj|jdd�}|rjt	j	ddt|�g�q�t	j	dddt|�g�nd	|i}t
j||�dS)
Nz/previous-hostname�i��create_hostname_fileTZhostnamectlzset-hostnamez--transient�HOSTNAME)r�endswithrZset_hostnamerZ
write_file�strZget_cfg_option_boolZ_cfgrrr)r�hostname�filenameZconfr)Zhost_cfgrrr�_write_hostnamefs 
zDistro._write_hostnamecCs$|j�r|j}n|j}||j|�fS)N)r�systemd_hostname_conf_fn�hostname_conf_fn�_read_hostname)rZhost_fnrrr�_read_system_hostname�szDistro._read_system_hostnamecCsx|j�r |jd�r tj|�j�S|j�rRtjdg�\}}|j�}t|�rL|S|Sn"tj|�\}}d|krp|dS|SdS)Nz/previous-hostnamer-r*)	rr+rZ	load_file�stripr�lenrr%)rr.�default�outZ_errr&r'rrrr2�szDistro._read_hostnamecCsZ|j|�}|j�r.tj|j�tj||j�n(dt|�i}tj|j	|�tj
||j�dS)NZZONE)Z
_find_tz_filerrZdel_file�tz_local_fnZsym_linkr,rr�
clock_conf_fn�copy)rZtzZtz_fileZ	clock_cfgrrr�set_timezone�s
zDistro.set_timezonecCs�|dkrg}tjd�r(tjd�dg}ntjd�ddg}|jd�|r^t|t�r^|j|�n|rvt|t�rv|j|�|j|�t	j
d|�}|j|�tj|dd	�dS)
NZdnfz Using DNF for package managementz Using YUM for package managementZyumz-tz-yz%s-%sF)Zcapture)rZwhich�LOG�debug�append�
isinstancer,�list�extendrZexpand_package_list)rZcommand�argsr�cmdrrrrr�s 






zDistro.package_commandcCs|jjd|jdgtd�dS)Nzupdate-sourcesZ	makecache)Zfreq)r
Zrunrr	)rrrr�update_package_sources�s
zDistro.update_package_sources)N)r)N)NN)�__name__�
__module__�__qualname__r9rrZnetwork_conf_fnr1r0Znetwork_script_tplr8Zusr_lib_execZrenderer_configsZprefer_fqdnrrrrr rr/r3r2r;rrDrrrrr
s4



!r
)Zloggingr"Z	cloudinitrrrrZcloudinit.distrosrrZ"cloudinit.distros.parsers.hostnamerZcloudinit.settingsr	Z	getLoggerrEr<r
rrrr�<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