%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/cc_ubuntu_drivers.cpython-39.pyc

a

'�DgN�@s�UdZddlZddlZddlmZddlmZzddlZdZWne	yXdZdZYn0ddl
mZmZm
Z
mZddlmZdd	lmZdd
lmZe�e�Zddged
gd�Zeed<dZdZdZed�dd�Zeeeedd�dd�Z dS)z<Ubuntu Drivers: Interact with third party drivers in Ubuntu.�N)�Cloud)�DistroTF)�subp�
temp_utils�
type_utils�util)�Config)�
MetaSchema)�PER_INSTANCEZcc_ubuntu_driversZubuntu�drivers)�idZdistrosZ	frequencyZactivate_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
Cs�t|t�s tdt�|�|f��d}t�t�||��}|sLt�	d||�dSt
�d�sjt�	d�|dg�d}t�|d�}|r�|d	�|�7}t�	d
|||r�|nd�t
j|��dd
�}tj�|d�}z�zHt�|t�t�d��}	|	�t|�Wd�n1�s0YWn:t�yH}
z t�tdt|
���WYd}
~
n
d}
~
00Wtj�|��r�t�|�ntj�|��r~t�|�0zt
�
ddd|g�WnXt
j�y�}z<t|j v�r�t�!d�nd|j"v�r�t�!d��WYd}~n
d}~00dS)Nz.'drivers' config expected dict, found '%s': %sznvidia/license-acceptedz$Not installing NVIDIA drivers. %s=%szubuntu-driverszI'ubuntu-drivers' command not available.  Installing ubuntu-drivers-commonzubuntu-drivers-commonZnvidiaznvidia/versionz:{}z<Installing and activating NVIDIA drivers (%s=%s, version=%s)ZlatestT)�dirZ	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�	TypeErrorrZobj_namerZtranslate_boolZget_cfg_by_path�LOG�debugr�which�formatrZmkdtempZget_tmp_exec_path�os�path�joinZ
write_file�NVIDIA_DEBCONF_CONTENT�debconfZDebconfCommunicatorZcommandr�	ExceptionZlogexc�str�isdirZdel_dirZProcessExecutionError� OLD_UBUNTU_DRIVERS_STDERR_NEEDLE�stderr�warning�stdout)�cfgZpkg_install_funcrZcfgpathZnv_accZ
driver_argZversion_cfgZtdirZdebconf_fileZdc�e�exc�r(�F/usr/lib/python3.9/site-packages/cloudinit/config/cc_ubuntu_drivers.py�install_drivers9sf
��
�

�0
���
r*)�namer%�cloud�args�returncCsFd|vrt�d|�dSts,t�d|�dSt|d|jj|j�dS)Nrz4Skipping module named %s, no 'drivers' key in configz<Skipping module named %s, 'python3-debconf' is not installed)rr�HAS_DEBCONFr#r*rZinstall_packages)r+r%r,r-r(r(r)�handleys��r0)!�__doc__ZloggingrZcloudinit.cloudrZcloudinit.distrosrrr/�ImportErrorZ	cloudinitrrrrZcloudinit.configrZcloudinit.config.schemar	Zcloudinit.settingsr
Z	getLogger�__name__rr
�__annotations__r!rrr*r�listr0r(r(r(r)�<module>s4

��

@

Zerion Mini Shell 1.0