HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/cloudinit/handlers/__pycache__/boot_hook.cpython-39.pyc
a

'�Dg��@sPddlZddlZddlmZmZmZddlmZe�e	�Z
Gdd�dej�ZdS)�N)�handlers�subp�util)�
PER_ALWAYSc@s*eZdZdgZdd�Zdd�Zdd�ZdS)	�BootHookPartHandlerz#cloud-boothookcKs2tj�|t�|�d�|_d|_|r.|��|_dS)NZ	boothooks)r�Handler�__init__rZ	get_ipath�boothook_dir�instance_idZget_instance_id)�self�pathsZ
datasource�_kwargs�r�@/usr/lib/python3.9/site-packages/cloudinit/handlers/boot_hook.pyrs
zBootHookPartHandler.__init__cCsJt�|�}tj�|j|�}tjt�|�|jdd�}t�	||�
�d�|S)Nr)�prefixi�)rZclean_filename�os�path�joinr	Zstrip_prefix_suffixZdos2unix�prefixesZ
write_file�lstrip)r�payload�filename�filepath�contentsrrr�_write_part s
�zBootHookPartHandler._write_partcCs�|tjvrdS|�||�}z8|jr0dt|j�ini}t�d�tj|g|dd�Wn@tjytt	�
td|�Yn ty�t	�
td|�Yn0dS)NZINSTANCE_IDzExecuting boothookF)Z
update_envZcapturez#Boothooks script %s execution errorz'Boothooks unknown error when running %s)rZCONTENT_SIGNALSrr
�str�LOG�debugrZProcessExecutionErrorrZlogexc�	Exception)r�dataZctyperrZ	frequencyr�envrrr�handle_part)s 
��
�zBootHookPartHandler.handle_partN)�__name__�
__module__�__qualname__rrrr!rrrrrs	r)
ZloggingrZ	cloudinitrrrZcloudinit.settingsrZ	getLoggerr"rrrrrrr�<module>s