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/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

��bn�@s�UdZddlZddlmZddlmZddlmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZeje�ZeZdgZd	d
ded�eed
�ged�Zeddddddddgddd�ddd�d�d�id�id�ZdZe
ee�ZdZdZd d!�Zd"d#�ZdS)$z<Ubuntu Drivers: Interact with third party drivers in Ubuntu.�N)�dedent)�log)�subp�
temp_utils�
type_utils�util)�
MetaSchema�get_meta_doc�validate_cloudconfig_schema)�PER_INSTANCEZubuntuZcc_ubuntu_driverszUbuntu Driversz,Interact with third party drivers in Ubuntu.zo        This module interacts with the 'ubuntu-drivers' command to install
        third party driver packages.zN        drivers:
          nvidia:
            license-accepted: true
        )�id�name�title�description�distrosZexamples�	frequency�object�driversF�nvidiazlicense-acceptedZbooleanz(Do you accept the NVIDIA driver license?)�typer�stringzYThe version of the driver to install (e.g. "390", "410"). Defaults to the latest version.)zlicense-accepted�version)r�additionalPropertiesZrequired�
properties)rrr)rrzDubuntu-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.
z�#!/bin/sh
# Allow cloud-init to trigger EULA acceptance via registering a debconf
# template to set linux/nvidia/latelink true
. /usr/share/debconf/confmodule
db_x_loadtemplatefile "$1" cloud-init
c$Cs�t|t�s tdtj|�|f��d}tjtj||��}|sLtj	d||�dSt
jd�sjtj	d�|dg�d}tj|d�}|r�|d	j|�7}tj	d
|||r�|nd�t
jdd
�}tjj|d�}tjj|d�}zry4tj|t�tj|tjt�dd�t
j
||g�Wn8tk
�r:}	ztjtdt|	���WYdd}	~	XnXWdtjj|��rXtj|�Xyt
j
ddd|g�WnVt
jk
�r�}
z6t|
jk�r�tjd�nd|
jk�r�tjd��WYdd}
~
XnXdS)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-commonrznvidia/versionz:{}z<Installing and activating NVIDIA drivers (%s=%s, version=%s)ZlatestT)Z	needs_exeznvidia.templateznvidia-debconf.shi�)�modez.Failed to register NVIDIA debconf template: %sZinstallz--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�debugrZwhich�formatrZmkdtemp�os�path�joinZ
write_file�NVIDIA_DEBCONF_CONTENTZencode_text�%NVIDIA_DRIVER_LATELINK_DEBCONF_SCRIPT�	ExceptionZlogexc�str�isdirZdel_dirZProcessExecutionError� OLD_UBUNTU_DRIVERS_STDERR_NEEDLE�stderrZwarning�stdout)�cfgZpkg_install_funcZcfgpathZnv_accZ
driver_argZversion_cfgZtdirZdebconf_fileZdebconf_script�e�exc�r/�'/usr/lib/python3.6/cc_ubuntu_drivers.py�install_driversms^



r1cCs8d|kr|jd|�dSt|t�t|d|jj�dS)Nrz4Skipping module named %s, no 'drivers' key in config)rr
�schemar1ZdistroZinstall_packages)r
r,ZcloudrZ_argsr/r/r0�handle�s

r3)�__doc__r!�textwraprZ	cloudinitrZloggingrrrrZcloudinit.config.schemarr	r
Zcloudinit.settingsrZ	getLogger�__name__rrr�metar2r)r$r%r1r3r/r/r/r0�<module>sH

E

Youez - 2016 - github.com/yon3zu
LinuXploit