%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/cloudinit/config/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_install_hotplug.cpython-312.pyc

�

���f��
��UdZddlZddlZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZmZdd	lmZdd
lmZdegegd�Zeed
<ej0e�ZdZdZdede
defd�Zdede
dede ddf
d�Z!y)z3Install hotplug udev rules if supported and enabled�N)�stages�subp�util)�Cloud)�Config)�
MetaSchema)�ALL_DISTROS)�
EventScope�	EventType)�PER_INSTANCE)�
DataSource�cc_install_hotplug)�id�distros�	frequency�activate_by_schema_keys�metaz2/etc/udev/rules.d/90-cloud-init-hook-hotplug.rulesz�# Installed by cloud-init due to network hotplug userdata
ACTION!="add|remove", GOTO="cloudinit_end"{extra_rules}
LABEL="cloudinit_hook"
SUBSYSTEM=="net", RUN+="{libexecdir}/hook-hotplug"
LABEL="cloudinit_end"
�
datasource�cfg�network_hotplug_enabledc���tj|jtjg�jtj
t
��v}tj||tjtj
��}|r|s�tjjt�rFtjd�tj t�t#j"gd��y|rtj%d�ytjd�yt#j&d�stjd�y|j(�|j(nd}|rd	|z}d
}tjj|�sd}tj+d�tj,tt.j1||�
���t#j"gd��y)N)rr�event_source_type�scopez!Uninstalling hotplug, not enabled)�udevadm�controlz--reload-ruleszOHotplug is unsupported by current datasource. Udev rules will NOT be installed.z%Skipping hotplug install, not enabledrz+Skipping hotplug install, udevadm not found��
z/usr/libexec/cloud-initz/usr/lib/cloud-initzInstalling hotplug.)�extra_rules�
libexecdir)�filename�content)r�HOTPLUG�get_supported_events�getr
�NETWORK�setr�update_event_enabled�os�path�exists�HOTPLUG_UDEV_PATH�LOG�debugr�del_filer�warning�which�extra_hotplug_udev_rules�info�
write_file�HOTPLUG_UDEV_RULES_TEMPLATE�format)rrr�hotplug_supported�hotplug_enabledrrs       �E/usr/lib/python3/dist-packages/cloudinit/config/cc_install_hotplug.py�install_hotplugr9%s���
"�)�)��'�'��):�):�(;�<�@�@������	
���
�1�1���#�+�+�� � �	�O�
�/�
�7�7�>�>�+�,��I�I�9�:��M�M�+�,��I�I�>�?�	�%��K�K�4�
�	�
�I�I�=�>���:�:�i� ��	�	�?�@���.�.�:�	�+�+�
��
��[�(��*�J�
�7�7�>�>�*�%�*�
��H�H�
"�#��O�O�"�+�2�2�#�
�3�
��	�I�I�6�7��name�cloud�args�returnc��d|vxr"d|dvxrd|ddvxr
d|dddv}t|j||�y)N�updates�network�when�hotplug)r9r)r;rr<r=rs     r8�handlerD[sh���S��	;���Y��'�	;��c�)�n�Y�/�/�	;�
��Y��	�2�6�:�:�	��E�$�$�c�+B�Cr:)"�__doc__�loggingr(�	cloudinitrrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.distrosr	�cloudinit.eventr
r�cloudinit.settingsr�cloudinit.sourcesr
r�__annotations__�	getLogger�__name__r,r+r4�boolr9�str�listrD�r:r8�<module>rVs���9��	�(�(�!�#�.�)�1�+�(���}��!�	��j���g����!��
I����38��38�	�38�"�38�lD��D�6�D�%�D�t�D��Dr:

Zerion Mini Shell 1.0