403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__/photon.cpython-36.pyc
3

��b��@shddlmZmZddlmZddlmZmZmZddlm	Z
ddlmZej
e�ZGdd�dej�ZdS)	�)�distros�helpers)�log)�net�subp�util)�	rhel_util)�PER_INSTANCEc@s�eZdZdZdZdZdZdeed�iZdZdd	�Z	d!d
d�Z
dd
�Zd"dd�Zdd�Z
dd�Zdd�Zd#dd�Zdd�Zdd�Zd$dd�Zdd �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)Z_cfg�getrrr�generate_fallback_config�info)r�keyrrrrr8szDistro.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_localeFs
zDistro.apply_localecCs|jd|d�dS)NZinstall)�pkgs)�package_command)r�pkglistrrr�install_packagesXszDistro.install_packagescCsN|r|jd�rtj||�n.|jddt|�g�\}}}|rJtjd||f�dS)Nz/previous-hostnameZhostnamectlzset-hostnamez3Error while setting hostname: %s
Given hostname: %s)�endswithrZ
write_filer�strrr)r�hostname�filename�ret�_outrrrr�_write_hostname\szDistro._write_hostnamecCs|j|j�}|j|fS)N)�_read_hostname�systemd_hostname_conf_fn)rZsys_hostnamerrr�_read_system_hostnamels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_errrrrr/pszDistro._read_hostnamecCsdS)Nz	127.0.1.1r)rrrr�_get_localhost_ipwszDistro._get_localhost_ipcCstj||j|�d�dS)N)�tzZtz_file)rZset_etc_timezoneZ
_find_tz_file)rr5rrr�set_timezonezszDistro.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__r0rr!Zresolve_conf_fnZrenderer_configsZprefer_fqdnr
rrr#r'r.r1r/r4r6r%r=rrrrr
s(
	



r
N)Z	cloudinitrrrZloggingrrrZcloudinit.distrosrr"Zcloudinit.settingsr	Z	getLoggerr>rr
rrrr�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit