HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_fan.cpython-310.pyc
o

x[h��
@s�UdZddlZddlmZmZddlmZddlmZddl	m
Z
ddlmZdd	ged
gd�Z
e
ed<e�e�Zdd
d�Zdd�Zdededededdf
dd�ZdS)z$Fan: Configure ubuntu fan networking�N)�subp�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCE�cc_fan�ubuntu�fan)�id�distros�	frequency�activate_by_schema_keys�metaz/etc/network/fan)�config�config_pathc
Cs�z
|�d|�d}Wntjy&}zd}t�d||�WYd}~nd}~ww|�d�s0|d7}tj||dd�z|�d|�|rGt�d	|�Wntjyb}z
t�d
||�WYd}~nd}~ww|�d|�dS)N�stopFTzfailed to stop %s: %s�
�w��omode�startzsuccess: %s startedzfailed to start %s: %s�enable)�manage_servicer�ProcessExecutionError�LOG�warning�endswithr�
write_file)�distro�service�config_file�content�stop_failed�e�r%�9/usr/lib/python3/dist-packages/cloudinit/config/cc_fan.py�stop_update_starts*��
���r'�name�cfg�cloud�args�returncCs�|�d�}|s	i}t�|tg�}|�d�st�d|�dStj|�d�|�d�dd�|j}t�	d�s9|�
dg�t|d|�d�|�d�d	�dS)
Nr
rz$%s: no 'fan' config entry. disablingrrr�fanctlz
ubuntu-fan)r r!r")�getr�
mergemanydict�BUILTIN_CFGr�debugrrr�which�install_packagesr')r(r)r*r+�cfgin�mycfgrr%r%r&�handle5s"



�r6)�__doc__�logging�	cloudinitrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.settingsrr�__annotations__�	getLogger�__name__rr0r'�str�listr6r%r%r%r&�<module>s$�
�"