HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/cloudinit/handlers/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/cloudinit/handlers/__pycache__/boot_hook.cpython-311.pyc
�

܍~c����ddlZddlmZddlmZddlmZmZddlmZej	e
��ZGd�dej��Z
dS)�N)�handlers)�log)�subp�util)�
PER_ALWAYSc�&�eZdZdgZd�Zd�Zd�ZdS)�BootHookPartHandlerz#cloud-boothookc���tj�|t��|�d��|_d|_|r|���|_dSdS)N�	boothooks)r�Handler�__init__r�	get_ipath�boothook_dir�instance_id�get_instance_id)�self�paths�
datasource�_kwargss    �>/usr/lib/python3/dist-packages/cloudinit/handlers/boot_hook.pyr
zBootHookPartHandler.__init__sc����!�!�$�
�3�3�3�!�O�O�K�8�8�������	<�)�9�9�;�;�D����	<�	<�c�.�tj|��}tj�|j|��}tjtj|��|jd���}tj	||�
��d��|S)Nr)�prefixi�)r�clean_filename�os�path�joinr�strip_prefix_suffix�dos2unix�prefixes�
write_file�lstrip)r�payload�filename�filepath�contentss     r�_write_partzBootHookPartHandler._write_part!s|���&�x�0�0���7�<�<�� 1�8�<�<���+��M�'�"�"�4�=��+;�
�
�
��	
���(�/�/�"3�"3�U�;�;�;��rc��|tjvrdS|�||��}	tj���}|j�t|j��|d<tj|g|���dS#tj	$rtjtd|��YdSt$rtjtd|��YdSwxYw)N�INSTANCE_ID)�envz#Boothooks script %s execution errorz'Boothooks unknown error when running %s)r�CONTENT_SIGNALSr'r�environ�copyr�strr�ProcessExecutionErrorr�logexc�LOG�	Exception)r�data�ctyper$r#�	frequencyr%r*s        r�handle_partzBootHookPartHandler.handle_part*s����H�,�,�,��F��#�#�G�X�6�6��
	��*�/�/�#�#�C���+�%(��)9�%:�%:��M�"��I�x�j�c�*�*�*�*�*�*���)�	N�	N�	N��K��B�H�M�M�M�M�M�M��	�	�	��K��>��
�
�
�
�
�
�	���s�AA=�=*C�*$C�CN)�__name__�
__module__�__qualname__r r
r'r6�rrr	r	sK������"�"�H�<�<�<��������rr	)r�	cloudinitrr�loggingrr�cloudinit.settingsr�	getLoggerr7r1rr	r:rr�<module>r?s���
�	�	�	�������$�$�$�$�$�$� � � � � � � � �)�)�)�)�)�)��g���!�!��$�$�$�$�$�(�*�$�$�$�$�$r