Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/distros/__pycache__/

[FILE] almalinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] alpine.cpython-310.pyc [ edit | delete | rename ]
[FILE] amazon.cpython-310.pyc [ edit | delete | rename ]
[FILE] aosc.cpython-310.pyc [ edit | delete | rename ]
[FILE] arch.cpython-310.pyc [ edit | delete | rename ]
[FILE] azurelinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] bsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] bsd_utils.cpython-310.pyc [ edit | delete | rename ]
[FILE] centos.cpython-310.pyc [ edit | delete | rename ]
[FILE] cloudlinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] cos.cpython-310.pyc [ edit | delete | rename ]
[FILE] debian.cpython-310.pyc [ edit | delete | rename ]
[FILE] dragonflybsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] eurolinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] fedora.cpython-310.pyc [ edit | delete | rename ]
[FILE] freebsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] gentoo.cpython-310.pyc [ edit | delete | rename ]
[FILE] mariner.cpython-310.pyc [ edit | delete | rename ]
[FILE] miraclelinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] netbsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] networking.cpython-310.pyc [ edit | delete | rename ]
[FILE] openbsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] OpenCloudOS.cpython-310.pyc [ edit | delete | rename ]
[FILE] openeuler.cpython-310.pyc [ edit | delete | rename ]
[FILE] openmandriva.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-leap.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-microos.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-tumbleweed.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse.cpython-310.pyc [ edit | delete | rename ]
[FILE] photon.cpython-310.pyc [ edit | delete | rename ]
[FILE] raspberry_pi_os.cpython-310.pyc [ edit | delete | rename ]
[FILE] rhel.cpython-310.pyc [ edit | delete | rename ]
[FILE] rhel_util.cpython-310.pyc [ edit | delete | rename ]
[FILE] rocky.cpython-310.pyc [ edit | delete | rename ]
[FILE] sle-micro.cpython-310.pyc [ edit | delete | rename ]
[FILE] sles.cpython-310.pyc [ edit | delete | rename ]
[FILE] sle_hpc.cpython-310.pyc [ edit | delete | rename ]
[FILE] suse.cpython-310.pyc [ edit | delete | rename ]
[FILE] TencentOS.cpython-310.pyc [ edit | delete | rename ]
[FILE] ubuntu.cpython-310.pyc [ edit | delete | rename ]
[FILE] ug_util.cpython-310.pyc [ edit | delete | rename ]
[FILE] virtuozzo.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/distros/__pycache__/raspberry_pi_os.cpython-310.pyc

o

��i��@sDddlZddlmZmZddlmZe�e�ZGdd�dej	�Z	dS)�N)�net�subp)�debiancsReZdZdedededef�fdd�Zdd	d
�Zdef�fdd
�Zdd�Z�Z	S)�Distro�layout�model�variant�optionscsZt��||||�t�gd��t�gd��|�dd�t�d�r+t�gd��dSdS)N)�/usr/bin/raspi-config�nonint�update_labwc_keyboard)r
r�update_squeekboard�restartrzkeyboard-setup�udevadm)r�triggerz--subsystem-match=inputz--action=change)�super�
set_keymapr�manage_service�which)�selfrrrr	��	__class__��C/usr/lib/python3/dist-packages/cloudinit/distros/raspberry_pi_os.pyrs��
��zDistro.set_keymapN�LANGc
Csrz
t�ddd|�g�WdStjy8|�d�s/t�d|�t�ddd|�d�g�YdSt�d|�YdSw)Nr
r�do_change_localez.UTF-8zTrying to set locale %s.UTF-8zFailed to set locale %s)r�ProcessExecutionError�endswith�LOG�info�error)r�locale�out_fn�keynamerrr�apply_locale.s(�
�
�
�	�zDistro.apply_locale�returnc
snt�j|fi|��}|s|Sztjgd�d|id�WdStjy6}z
t�d|�WYd}~dSd}~ww)z�
        Add a user to the system using standard GNU tools

        This should be overridden on distros where useradd is not desirable or
        not available.

        Returns False if user already exists, otherwise True.
        )z/usr/bin/rename-userz-fz-s�	SUDO_USER)�
update_envzFailed to setup user: %sNFT)r�add_userrrrr )r�name�kwargs�result�errrr(Fs	�
���zDistro.add_usercCs:d}|j�|d�}t�d||�|st��St�d�dS)N�disable_fallback_netcfgTz%s value is: %sz}Skipping generation of fallback network config as per configuration. Rely on Raspberry Pi OS's default network configuration.)�_cfg�getr�debugr�generate_fallback_configr)r�keyr-rrrr1ds�zDistro.generate_fallback_config)Nr)
�__name__�
__module__�__qualname__�strrr$�boolr(r1�
__classcell__rrrrrs

r)
�logging�	cloudinitrr�cloudinit.distrosr�	getLoggerr3rrrrrr�<module>s


Upload File: