HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_fan.cpython-38.pyc
U

Ӈg��@s�UdZddlZddlmZmZddlmZddlmZddl	m
Z
ddlmZdd	ged
gd�Z
e
ed<e�e�Zdd
d�Zdd�Zeeeedd�dd�ZdS)z$Fan: Configure ubuntu fan networking�N)�subp�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCEZcc_fanZubuntu�fan)�idZdistrosZ	frequencyZactivate_by_schema_keys�metaz/etc/network/fan)�config�config_pathc
Cs�z|�d|�d}Wn6tjk
rJ}zd}t�d||�W5d}~XYnX|�d�s^|d7}tj||dd�z |�d|�|r�t�d	|�Wn2tjk
r�}zt�d
||�W5d}~XYnX|�d|�dS)N�stopFTzfailed to stop %s: %s�
�w�Zomode�startzsuccess: %s startedzfailed to start %s: %s�enable)Zmanage_servicerZProcessExecutionError�LOGZwarning�endswithr�
write_file)�distro�service�config_file�contentZstop_failed�e�r�9/usr/lib/python3/dist-packages/cloudinit/config/cc_fan.py�stop_update_starts  
 r)�name�cfg�cloud�args�returncCs�|�d�}|si}t�|tg�}|�d�s:t�d|�dStj|�d�|�d�dd�|j}t�	d�sr|�
dg�t|d|�d�|�d�d	�dS)
Nrrz$%s: no 'fan' config entry. disablingrrrZfanctlz
ubuntu-fan)rrr)�getrZ
mergemanydict�BUILTIN_CFGr�debugrrrZwhichZinstall_packagesr)rrr r!ZcfginZmycfgrrrr�handle5s"


�r&)�__doc__ZloggingZ	cloudinitrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrr
�__annotations__Z	getLogger�__name__rr$r�str�listr&rrrr�<module>s"�
�