관리-도구
편집 파일: cc_fan.cpython-39.opt-1.pyc
a ����'�Dg�����������������������@���s����U�d�Z�ddlZddlmZmZ�ddlmZ�ddlmZ�ddl m Z �ddlmZ�dd ged 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�������������� ���C���s����z|���d|��d}W�n8�tjyL�}�zd}t�d||��W�Y�d�}~n d�}~0�0�|�d�s`|d7�}tj||dd��z |���d|��|r�t�d |��W�n4�tjy��}�zt�d ||��W�Y�d�}~n d�}~0�0�|���d|��d�S�)N�stopFTzfailed to stop %s: %s� �w�Zomode�startzsuccess: %s startedzfailed to start %s: %s�enable)Zmanage_servicer���ZProcessExecutionError�LOGZwarning�endswithr���� write_file)�distro�service�config_file�contentZstop_failed�e��r����;/usr/lib/python3.9/site-packages/cloudinit/config/cc_fan.py�stop_update_start���s ����$ $r���)�name�cfg�cloud�args�returnc�����������������C���s����|��d�}|si�}t�|tg�}|��d�s:t�d|���d�S�tj|��d�|��d�dd��|j}t� d�sr|� dg��t|d|��d�|��d�d ��d�S�) Nr���r���z$%s: no 'fan' config entry. disablingr���r���r���Zfanctlz ubuntu-fan)r���r���r���)�getr���Z mergemanydict�BUILTIN_CFGr����debugr���r���r����whichZinstall_packagesr���)r���r���r ���r!���ZcfginZmycfgr���r���r���r����handle5���s"���� �r'���)�__doc__ZloggingZ cloudinitr���r���Zcloudinit.cloudr���Zcloudinit.configr���Zcloudinit.config.schemar���Zcloudinit.settingsr���r ����__annotations__Z getLogger�__name__r���r$���r����str�listr'���r���r���r���r����<module>���s"���� �