%PDF- %PDF-
Mini Shell

Mini Shell

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

o

 Nhw	�@sDddlZddlZddlmZmZe�e�ZGdd�dejj	j
�ZdS)�N)�subp�utilc@sleZdZdZdgZgd�Zddd�Zdd�Zd	d
�Ze	dd�de
d
e
fdd��Zdd�Zdd�Z
dd�ZdS)�Distroz/etc/myname�rcctl)z
^{username}::z^{username}:\*:z'^{username}:\*\*\*\*\*\*\*\*\*\*\*\*\*:NcCst�|j�S�N)r�load_text_file�hostname_conf_fn)�self�filename�default�r�;/usr/lib/python3/dist-packages/cloudinit/distros/openbsd.py�_read_hostname�zDistro._read_hostnamecCs|d}t�|j|�dS)N�
)r�
write_filer)r	�hostnamer
�contentrrr
�_write_hostnameszDistro._write_hostnamecCsdd||gS)N�usermodz-Gr)r	�member_name�
group_namerrr
�_get_add_member_to_group_cmd"rz#Distro._get_add_member_to_group_cmd)�rcs�action�servicec	Gs`|j}d|gd|gd|gd|gd|gd|gd|gd|gd�}t|�t||�}tj|d|d	�S)
z�
        Perform the requested action on a service. This handles OpenBSD's
        'rcctl'.
        May raise ProcessExecutionError
        �stop�start�enable�disable�restart�check)rrrrr �reloadz
try-reload�statusT)�capturer)�init_cmd�listr)�clsrrr�
extra_argsr%�cmds�cmdrrr
�manage_service%s�
zDistro.manage_servicecCs8zt�ddd|g�WdStyt�td|��w)Nrz-p�*zFailed to lock user %s)r�	Exceptionr�logexc�LOG�r	�namerrr
�lock_passwd:s�zDistro.lock_passwdcCst�d|�dS)NzDOpenBSD password lock is not reversible, ignoring unlock for user %s)r/�debugr0rrr
�
unlock_passwdAs�zDistro.unlock_passwdcCsiS)z:Return env vars used in OpenBSD package_command operationsr)r	rrr
�_get_pkg_cmd_environHszDistro._get_pkg_cmd_environr)�__name__�
__module__�__qualname__rr%�#shadow_empty_locked_passwd_patternsrrr�classmethod�strr+r2r4r5rrrr
r
s
r)�logging�cloudinit.distros.netbsd�	cloudinitrr�	getLoggerr6r/�distros�netbsd�NetBSDrrrrr
�<module>s



Zerion Mini Shell 1.0