%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/cloudinit/distros/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/cloudinit/distros/__pycache__/arch.cpython-312.pyc

�

�fS���ddlZddlmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
eje�ZGd�dej"�Zy)	�N)�distros�helpers�subp�util)�PackageList)�HostnameConf)�CLOUDINIT_NETPLAN_FILE)�PER_INSTANCEc�t�eZdZdZdgZdeddd�iZd�Zdd	�Zd
e	fd�Z
d�Zd
�Zd�Z
dd�Zd�Zd�Zdd�Zd�Zy)�Distroz/etc/locale.gen�	systemctl�netplanz# generated by cloud-init
T)�netplan_path�netplan_header�postcmdsc��tjj||||�tj|�|_d|_d|d<y)N�arch�sshd�ssh_svcname)rr�__init__r�Runners�_runner�osfamily)�self�name�cfg�pathss    �8/usr/lib/python3/dist-packages/cloudinit/distros/arch.pyrzDistro.__init__s=��������d�C��7����u�-�����
�#��M��Nc�4�|�|dk7rtjd|�tj�d|zdg}tj|j
dj
|��tjdgd��tjd	d
|gd��y)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�liness    r�apply_localezDistro.apply_locale&s�����&�,>�">��K�K�,��
�
�����&�!��	
��	
����*�*�D�I�I�e�,<�=��	�	�<�.�%�0�	
�	�	�;��f�5�u�Er�pkglistc�J�|j�|jd|��y)Nr!)�pkgs)�update_package_sources�package_command)rr0s  r�install_packageszDistro.install_packages9s!���#�#�%����R�g��.rc�@�d}	|j|�}|std�}|j|�tj|t|�dd��y#t$r>tj|jdd�}|rnt
j
d�YyY��wxYw)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�confr7s     r�_write_hostnamezDistro._write_hostname=s�����	��+�+�H�5�D����#�D����(�#�����#�d�)�3�U�C���
	�#'�#;�#;��	�	�1�4�$� �$�����N����
	�s�A�AB�Bc�T�|j|j�}|j|fS�N)�_read_hostname�hostname_conf_fn)r�sys_hostnames  r�_read_system_hostnamezDistro._read_system_hostnameSs)���*�*�4�+@�+@�A���%�%�|�4�4rc�b�ttj|��}|j�|SrG)rr�load_text_file�parse)rrCrDs   rr;zDistro._read_hostname_confWs%���D�/�/��9�:���
�
���rc�l�d}	|j|�}|j}|s|S|S#t$rY�wxYwrG)r;rBr<)rrC�defaultrBrDs     rrHzDistro._read_hostname\sH����	��+�+�H�5�D��}�}�H���N����	�	��	�s�'�	3�3c���tjd|�	tjddd|g�y#tj$rt	j
td|�YywxYw)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)rrBs  r�_apply_hostnamezDistro._apply_hostnameisW���	�	�@�(�	
�	��I�I�}�m�^�X�N�O���)�)�	��K�K��M��
�	�s�2�.A#�"A#c�P�tj||j|���y)N)�tz�tz_file)r�set_etc_timezone�
_find_tz_file)rrXs  r�set_timezonezDistro.set_timezonevs��� � �B��0B�0B�2�0F�Grc�R�|�g}gd�}|r"t|t�r|j|�n#|r!t|t�r|j	|�|dk(rd}|r|j|�tjd|�}|j	|�tj|d��y)N)�pacmanz-Syz--quietz--noconfirm�upgradez-uz%s-%sFr#)�
isinstancerA�append�list�extendr�expand_package_listr)r�command�argsr2�cmdr0s      rr4zDistro.package_commandys����<��D�9���J�t�S�)��J�J�t��
�j��t�,��J�J�t���i���G���J�J�w���*�*�7�D�9���
�
�7��	
�	�	�#�u�%rc�`�|jjd|jdgt��y)Nzupdate-sourcesz-y)�freq)r�runr4r
)rs rr3zDistro.update_package_sources�s*��������d�2�2�T�F��	�	
rrG)NN)�__name__�
__module__�__qualname__r*�init_cmdr	�renderer_configsrr/rr5rErKr;rHrVr\r4r3�rrrrsh��%�M��}�H��2�;��
���$�F�&/��/�D�,5��
	��H�&�.
rr)�logging�	cloudinitrrrr�cloudinit.distrosr�"cloudinit.distros.parsers.hostnamer�cloudinit.net.netplanr	�cloudinit.settingsr
�	getLoggerrkr&rrprr�<module>rxs@���2�2�)�;�8�+��g����!��A
�W�^�^�A
r

Zerion Mini Shell 1.0