name : cc_bootcmd.cpython-39.pyc
a

'�Dg��@s�UdZddlZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
e�e�Ze
Zdd	ge
d
gd�Zeed<ee	eedd
�dd�ZdS)z:Bootcmd: run arbitrary commands early in the boot process.�N)�subp�
temp_utils�util)�Cloud)�Config)�
MetaSchema)�
PER_ALWAYSZ
cc_bootcmd�all�bootcmd)�idZdistros�	frequencyZactivate_by_schema_keys�meta)�name�cfg�cloud�args�returnc	Csd|vrt�d|�dStjdd���}z*t�|d�}|�t�|��|��Wn8t	y�}z t�
tdt|���WYd}~n
d}~00z6|��}|r�dt|�ini}t
j
d|jg|dd	�Wn"t	y�t�
td
|��Yn0Wd�n1s�0YdS)Nr
z;Skipping module named %s, no 'bootcmd' key in configurationz.sh)�suffixzFailed to shellify bootcmd: %sZINSTANCE_IDz/bin/shF)Z
update_envZcapturezFailed to run bootcmd module %s)�LOG�debugrZExtendedTemporaryFilerZshellify�writeZencode_text�flush�	ExceptionZlogexc�strZget_instance_idrr)	rrrrZtmpfZcontent�eZiid�env�r�?/usr/lib/python3.9/site-packages/cloudinit/config/cc_bootcmd.py�handle!s(�r)�__doc__ZloggingZ	cloudinitrrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrZ	getLogger�__name__rrr
�__annotations__r�listrrrrr�<module>
s
�

© 2025 Cubjrnet7