%PDF- %PDF-
Mini Shell

Mini Shell

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

�

���fw	���ddlZddlZddlmZmZej
e�ZGd�dejjj�Zy)�N)�subp�utilc�d�eZdZdZdgZgd�Zdd�Zd�Zd�Ze	dd�d	e
d
e
fd��Zd�Zd
�Z
d�Zy)�Distroz/etc/myname�rcctl)z
^{username}::z^{username}:\*:z'^{username}:\*\*\*\*\*\*\*\*\*\*\*\*\*:Nc�@�tj|j�S�N)r�load_text_file�hostname_conf_fn)�self�filename�defaults   �;/usr/lib/python3/dist-packages/cloudinit/distros/openbsd.py�_read_hostnamezDistro._read_hostnames���"�"�4�#8�#8�9�9�c�N�|dz}tj|j|�y)N�
)r�
write_filer)r�hostnamer
�contents    r�_write_hostnamezDistro._write_hostnames���T�/������-�-�w�7rc��dd||gS)N�usermodz-G�)r�member_name�
group_names   r�_get_add_member_to_group_cmdz#Distro._get_add_member_to_group_cmd"s���4��[�9�9r)�rcs�action�servicec	��|j}d|gd|gd|gd|gd|gd|gd|gd|gd�}t|�t||�z}tj|d|�	�S)
z�
        Perform the requested action on a service. This handles OpenBSD's
        'rcctl'.
        May raise ProcessExecutionError
        �stop�start�enable�disable�restart�check)r"r#r$r%r&�reloadz
try-reload�statusT)�capturer)�init_cmd�listr)�clsrr r�
extra_argsr+�cmds�cmds        r�manage_servicezDistro.manage_service%s����<�<���W�%��w�'���)�!�7�+�!�7�+� �'�*�$�g�.���(�	
���8�n�t�D��L�1�1���y�y��d��4�4rc��	tjddd|g�y#t$rtjtd|��wxYw)Nrz-p�*zFailed to lock user %s)r�	Exceptionr�logexc�LOG�r�names  r�lock_passwdzDistro.lock_passwd:s?��	��I�I�y�$��T�2�3���	��K�K��5�t�<��	�s	��&Ac�0�tjd|�y)NzDOpenBSD password lock is not reversible, ignoring unlock for user %s)r6�debugr7s  r�
unlock_passwdzDistro.unlock_passwdAs���	�	�
*��	
rc��iS)z:Return env vars used in OpenBSD package_command operationsr)rs r�_get_pkg_cmd_environzDistro._get_pkg_cmd_environHs���	rr	)�__name__�
__module__�__qualname__rr+�#shadow_empty_locked_passwd_patternsrrr�classmethod�strr1r9r<r>rrrrr
sZ��$���y�H�+�'�:�8�:��HL�5�C�5�#�5��5�(�
�rr)�logging�cloudinit.distros.netbsd�	cloudinitrr�	getLoggerr?r6�distros�netbsd�NetBSDrrrr�<module>rLs@��
�� ��g����!��=�Y�
�
�
%�
%�
,�
,�=r

Zerion Mini Shell 1.0