403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/config/__pycache__/cc_fan.cpython-36.pyc
3

��b
�@sXdZddlmZddlmZmZddlmZeje	�Z
eZddd�Zdd	�Z
d
d�ZdS)a<
Fan
---
**Summary:** configure ubuntu fan networking

This module installs, configures and starts the ubuntu fan network system. For
more information about Ubuntu Fan, see:
``https://wiki.ubuntu.com/FanNetworking``.

If cloud-init sees a ``fan`` entry in cloud-config it will:

    - write ``config_path`` with the contents of the ``config`` key
    - install the package ``ubuntu-fan`` if it is not installed
    - ensure the service is started (or restarted if was previously running)

**Internal name:** ``cc_fan``

**Module frequency:** per instance

**Supported distros:** ubuntu

**Config keys**::

    fan:
        config: |
            # fan 240
            10.0.0.0/8 eth0/16 dhcp
            10.0.0.0/8 eth1/16 dhcp off
            # fan 241
            241.0.0.0/8 eth0/16 dhcp
        config_path: /etc/network/fan
�)�log)�subp�util)�PER_INSTANCENz/etc/network/fan)�config�config_pathcCs�y|jd|�d}Wn6tjk
rJ}zd}tjd||�WYdd}~XnX|jd�s^|d7}tj||dd�y |jd|�|r�tjd	|�Wn2tjk
r�}ztjd
||�WYdd}~XnX|jd|�dS)N�stopFTzfailed to stop %s: %s�
�w)�omode�startzsuccess: %s startedzfailed to start %s: %s�enable)Zmanage_servicerZProcessExecutionError�LOGZwarning�endswithr�
write_file)�distro�service�config_file�contentZstop_failed�e�r�/usr/lib/python3.6/cc_fan.py�stop_update_start6s  
 rcCs�|jd�}|si}tj|tg�}|jd�s:tjd|�dStj|jd�|jd�dd�|j}tj	d�sr|j
dg�t|d|jd�|jd�d	�dS)
NZfanrz$%s: no 'fan' config entry. disablingrr
)rZfanctlz
ubuntu-fan)rrr)�getrZ
mergemanydict�BUILTIN_CFGr�debugrrrZwhichZinstall_packagesr)�nameZcfgZcloudr�argsZcfginZmycfgrrrr�handleLs 


r)�__doc__Z	cloudinitrZloggingrrZcloudinit.settingsrZ	getLogger�__name__rZ	frequencyrrrrrrr�<module>&s


Youez - 2016 - github.com/yon3zu
LinuXploit