| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python2.7/site-packages/cloudinit/config/ |
Upload File : |
�
oB�]c @ sx d Z d d l m Z d d l m Z d d l m Z e j e � Z e Z
i d
d 6d d 6Z e
d � Z d � Z d
S( s<
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
i����( t log( t PER_INSTANCE( t utilt configs /etc/network/fant config_pathc s! | r? i d d � g d 6d d � g d 6d d � g d 6} n i d d g d 6d d g d 6} � f d � } | | d d d � �} | j d � s� | d 7} n t j | | d
d �| | d d d � �} | r� | r� t j d
� � n d | k r| | d d d � �} n | S( Nt systemctlt stopt startt enablet servicec sK y t j | d t �SWn- t j k
rF } t j d � | | � t SXd S( Nt captures failed: %s (%s): %s( R t subpt Truet ProcessExecutionErrort LOGt warningt False( t cmdt msgt e( R ( s; /usr/lib/python2.7/site-packages/cloudinit/config/cc_fan.pyt run? s
R s stop %ss
t omodet ws start %ss success: %s starteds enable %s( t endswithR t
write_fileR R ( R t config_filet contentt systemdt cmdsR t stop_failedt ret( ( R s; /usr/lib/python2.7/site-packages/cloudinit/config/cc_fan.pyt stop_update_start6 s"