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

Ӈg�
��UdZddlZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZeje�ZeZdd	ged
gd�Zeed<d
ede
dededdf
d�Zy)z:Bootcmd: run arbitrary commands early in the boot process.�N)�signal_handler�subp�
temp_utils�util)�Cloud)�Config)�
MetaSchema)�
PER_ALWAYS�
cc_bootcmd�all�bootcmd)�id�distros�	frequency�activate_by_schema_keys�meta�name�cfg�cloud�args�returnc	���d|vrtjd|�ytjd��5}	t	j
|d�}|j
t	j|��|j�	|j�}|r
dt|�ini}tj�5tjd|j g|d�	�ddd�ddd�y#t$r*}t	jtdt|���d}~wwxYw#1swY�HxYw#t$rt	jtd
|��wxYw#1swYyxYw)Nr
z;Skipping module named %s, no 'bootcmd' key in configurationz.sh)�suffixzFailed to shellify bootcmd: %s�INSTANCE_IDz/bin/shF)�
update_env�capturezFailed to run bootcmd module %s)�LOG�debugr�ExtendedTemporaryFiler�shellify�write�encode_text�flush�	Exception�logexc�str�get_instance_idr�
suspend_crashrr)	rrrr�tmpf�content�e�iid�envs	         �=/usr/lib/python3/dist-packages/cloudinit/config/cc_bootcmd.py�handler/!s1������	�	�I�4�	
�	�	�	)�	)��	7��4�	��m�m�C�	�N�3�G��J�J�t�'�'��0�1��J�J�L�
		��'�'�)�C�/2�=�#�c�(�+��C��-�-�/�
��	�	���	�	�*�s�E��
����
�	��K�K��=�s�1�v�F���	��
�
���	��K�K��>��E��	��!��sS�E�AC,�5D.�6%D"�D.�,	D�5%D�D�E�"D+	�'D.�.&E�E�E )�__doc__�logging�	cloudinitrrrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar	�cloudinit.settingsr
�	getLogger�__name__rrr�__annotations__r&�listr/��r.�<module>r=s��A��<�<�!�#�.�)��g����!���	���w�� )�{�	��j�����6��%��t���r<