404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.188.92.132: ~ $
3

\�me��@shddlZddlmZmZmZmZmZddlmZddlm	Z
ddlmZej
e�ZGdd�dej�ZdS)�N)�distros�helpers�net�subp�util)�PackageList)�	rhel_util)�PER_INSTANCEc@s�eZdZdZdZdZdZdeed�iZdZdd	�Z	d"d
d�Z
dd
�Zd#dd�Ze
d�dd�Zdd�Zdd�Zd$dd�Zdd�Zdd�Zd%dd�Zd d!�ZdS)&�Distroz
/etc/hostnamez/etc/systemd/network/z/etc/locale.confz/etc/systemd/resolved.confZnetworkd)Zresolv_conf_fn�network_conf_dirTcCs0tjj||||�tj|�|_d|_dg|_dS)NZphoton�	systemctl)rr
�__init__rZRunners�_runnerZosfamilyZinit_cmd)�self�nameZcfg�paths�r�/usr/lib/python3.6/photon.pyr
szDistro.__init__cCsntjd|�y8tj||d�\}}|r<tjd||�d||fSd||fStjk
rhtjtd|�dSXdS)NzAttempting to run: %s)�capturez(Running %s resulted in stderr output: %sTFzCommand %s failed)TNN)�LOG�debugr�warningZProcessExecutionErrorrZlogexc)r�cmdr�out�errrrr�exec_cmd(s


zDistro.exec_cmdcCs:d}|jj|d�}tjd||�|s,tj�Stjd�dS)N�disable_fallback_netcfgTz%s value is: %szJSkipping generate_fallback_config. Rely on PhotonOS default network config)�_cfg�getrrr�generate_fallback_config�info)r�keyrrrrr6szDistro.generate_fallback_configNcCs6|s
|j}d|i}tj||�dddg}|j|�dS)NZLANGrZrestartzsystemd-localed)�systemd_locale_conf_fn�rhutilZupdate_sysconfig_filer)rZlocaleZout_fnZ
locale_cfgrrrr�apply_localeDs
zDistro.apply_locale)�pkglistcCs|jd|d�dS)NZinstall)�pkgs)�package_command)rr%rrr�install_packagesVszDistro.install_packagescCs�|r|jd�rtj||�ndd}tj|jdd�}|rP|jddt|�g�\}}}n|jdddt|�g�\}}}|r�tjd||f�dS)Nz/previous-hostname�create_hostname_fileTZhostnamectlzset-hostnamez--transientz3Error while setting hostname: %s
Given hostname: %s)	�endswithrZ
write_fileZget_cfg_option_boolrr�strrr)r�hostname�filename�retr)�_outrrrr�_write_hostnameZs$zDistro._write_hostnamecCs|j|j�}|j|fS)N)�_read_hostname�systemd_hostname_conf_fn)rZsys_hostnamerrr�_read_system_hostnamexszDistro._read_system_hostnamecCs@|r|jd�rtj|�j�S|jddg�\}}}|r<|j�S|S)Nz/previous-hostnamer,z-f)r*rZ	load_file�stripr)rr-�defaultZ_retrZ_errrrrr1|szDistro._read_hostnamecCsdS)Nz	127.0.1.1r)rrrr�_get_localhost_ip�szDistro._get_localhost_ipcCstj||j|�d�dS)N)�tzZtz_file)rZset_etc_timezoneZ
_find_tz_file)rr7rrr�set_timezone�szDistro.set_timezonec	Cs�|sg}ddg}|r*t|t�r*|j|�n|rBt|t�rB|j|�|j|�tjd|�}|j|�|j|�\}}}|r�tj	d|�dS)NZtdnfz-yz%s-%sz#Error while installing packages: %s)
�
isinstancer+�append�list�extendrZexpand_package_listrr�error)	rZcommand�argsr&rr%r.r/rrrrr'�s


zDistro.package_commandcCs|jjd|jdgtd�dS)Nzupdate-sourcesZ	makecache)Zfreq)rZrunr'r	)rrrr�update_package_sources�s
zDistro.update_package_sources)T)N)N)NN)�__name__�
__module__�__qualname__r2rr"Zresolve_conf_fnZrenderer_configsZprefer_fqdnr
rrr$rr(r0r3r1r6r8r'r?rrrrr
s(
	



r
)ZloggingZ	cloudinitrrrrrZcloudinit.distrosrrr#Zcloudinit.settingsr	Z	getLoggerr@rr
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