403Webshell
Server IP : 195.114.193.97  /  Your IP : 216.73.217.93
Web Server : LiteSpeed
System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64
User : sembi4241 ( 1126)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/config/__pycache__/cc_install_hotplug.cpython-310.pyc
o

쑛h��
@s�UdZddlZddlZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZmZdd	lmZdd
lmZdegegd�Zeed
<e�e�ZdZdZdede
defdd�Zdede
dede ddf
dd�Z!dS)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", GOTO="cloudinit_end"{extra_rules}
LABEL="cloudinit_hook"
SUBSYSTEM=="net", RUN+="{libexecdir}/hook-hotplug"
LABEL="cloudinit_end"
�
datasource�cfg�network_hotplug_enabledcCstj|�tjg��tjt��v}tj||tjtjd�}|r|sHt	j
�t�r8t
�d�t�t�t�gd��dS|rAt
�d�dSt
�d�dSt�d�sTt
�d�dS|jdur\|jnd}|rdd	|}d
}t	j
�|�snd}t
�d�tjttj||d
�d�t�gd��dS)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_enabledrr�r6�E/usr/lib/python3/dist-packages/cloudinit/config/cc_install_hotplug.py�install_hotplug%sX���

��
�


��
��r8�name�cloud�args�returncCsJd|vod|dvod|ddvod|dddv}t|j||�dS)N�updates�network�when�hotplug)r8r)r9rr:r;rr6r6r7�handle[s
���rA)"�__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)r2�boolr8�str�listrAr6r6r6r7�<module>s6�
	��
�"6

Youez - 2016 - github.com/yon3zu
LinuXploit