%PDF- %PDF-
Mini Shell

Mini Shell

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

�

���f^�
��UdZddlZddlZddlmZddlmZ	ddlZdZddl
mZmZm
Z
mZddlmZdd	lmZdd
lmZej*e�Zddged
gd�Zeed<dZdZdZdefd�Zdededededdf
d�Z y#e	$rdZdZY�dwxYw)z<Ubuntu Drivers: Interact with third party drivers in Ubuntu.�N)�Cloud)�DistroTF)�subp�
temp_utils�
type_utils�util)�Config)�
MetaSchema)�PER_INSTANCE�cc_ubuntu_drivers�ubuntu�drivers)�id�distros�	frequency�activate_by_schema_keys�metazDubuntu-drivers: error: argument <command>: invalid choice: 'install'z�Template: linux/nvidia/latelink
Type: boolean
Default: true
Description: Late-link NVIDIA kernel modules?
 Enable this to link the NVIDIA kernel modules in cloud-init and
 make them available for use.
�X_LOADTEMPLATEFILE�distroc�|�t|t�s$tdtj|��d|����d}tjtj||��}|stjd||�ytjd�stjd�|dg�d}tj|d	�}|r|d
j|�z
}tjd|||r|nd�tj|j�d
��}t j"j%|d�}	tj&|t(�t+j,d�5}	|	j/t0|�ddd�t j"j9|�rtj:|�		tjddd|g�y#1swY�YxYw#t2$r*}
tj4tdt7|
���d}
~
wwxYw#t j"j9|�rtj:|�wwxYw#tj<$rQ}t>|j@vrtjCd��d|jDvrtjCd��d}~wwxYw)Nz''drivers' config expected dict, found 'z': znvidia/license-acceptedz$Not installing NVIDIA drivers. %s=%szubuntu-driverszI'ubuntu-drivers' command not available.  Installing ubuntu-drivers-commonzubuntu-drivers-common�nvidiaznvidia/versionz:{}z<Installing and activating NVIDIA drivers (%s=%s, version=%s)�latestT)�dir�	needs_exeznvidia.templatez
cloud-initz.Failed to register NVIDIA debconf template: %s�installz--gpgpuz[the available version of ubuntu-drivers is too old to perform requested driver installationz"No drivers found for installation.z0ubuntu-drivers found no drivers for installation)#�
isinstance�dict�	TypeErrorr�obj_namer�translate_bool�get_cfg_by_path�LOG�debugr�which�formatr�mkdtemp�get_tmp_exec_path�os�path�join�
write_file�NVIDIA_DEBCONF_CONTENT�debconf�DebconfCommunicator�commandr�	Exception�logexc�str�isdir�del_dir�ProcessExecutionError� OLD_UBUNTU_DRIVERS_STDERR_NEEDLE�stderr�warning�stdout)�cfg�pkg_install_funcr�cfgpath�nv_acc�
driver_arg�version_cfg�tdir�debconf_file�dc�e�excs            �D/usr/lib/python3/dist-packages/cloudinit/config/cc_ubuntu_drivers.py�install_driversrF9s<���c�4� ���"�"�3�'��
.�
�	
�
(�G��
 �
 ��!5�!5�c�7�!C�
D�F���	�	�8�'�6�J���:�:�&�'��	�	�
/�	
�	�1�2�3��J��&�&�s�,<�=�K���e�l�l�;�/�/�
��I�I�F���"���	����&�":�":�"<��M�D��7�7�<�<��&7�8�L������&<�=�
�
(�
(��
6�	9�"��J�J�)�<�8�	9��7�7�=�=����L�L���
��	�	�#�Y�	�:�F�G�	9�	9��������A�3�q�6�	
�	��	���7�7�=�=����L�L�����
�%�%��+�s�z�z�9��K�K�D�
�	�2�S�Z�Z�
?��K�K�J�K�
���sU�=/G'�,G�G'�I�G$� G'�'	H�0%H�H�H�7I�J;�*AJ6�6J;�namer:�cloud�args�returnc���d|vrtjd|�ytstjd|�yt	|d|j
j|j
�y)Nrz4Skipping module named %s, no 'drivers' key in configz<Skipping module named %s, 'python3-debconf' is not installed)r"r#�HAS_DEBCONFr8rFr�install_packages)rGr:rHrIs    rE�handlerNysW������	�	�H�$�O������J��	
�	���I�����5�5�u�|�|��)!�__doc__�loggingr(�cloudinit.cloudr�cloudinit.distrosrr-rL�ImportError�	cloudinitrrrr�cloudinit.configr	�cloudinit.config.schemar
�cloudinit.settingsr�	getLogger�__name__r"r�__annotations__r6r,rrFr2�listrN�rOrE�<module>r^s���C��	�!�$����K�9�8�#�.�+��g����!����z�� )�{�	��j��K�!���*��=�6�=�@
��
�6�
�%�
�t�
��
��U���G��K��s�A8�8	B�B

Zerion Mini Shell 1.0