Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /usr/lib/python2.7/site-packages/firewall/core/ |
� �c�`c @ sp d Z d d g Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d � Z d � Z d S( s. Functions to search for and change ifcfg filest search_ifcfg_of_interfacet ifcfg_set_zone_of_interfacei����N( t config( t log( t ifcfgc C s t j j t j � s d Sx� t t j t j � � D]� } | j d � sM q2 n x5 d d d d d d g D] } | j | � rf qf qf qf Wd | k r� q2 n t d t j | f � } | j � | j d � | k r2 | Sq2 Wd t j | f } t j j | � rt | � } | j � | Sd S( s6 search ifcfg file for the interface in config.IFCFGDIRs ifcfg-s .baks .origs .rpmnews .rpmorigs .rpmsaves -ranget .s %s/%st DEVICEs %s/ifcfg-%sN( t ost patht existsR t IFCFGDIRt Nonet sortedt listdirt startswitht endswithR t readt get( t interfacet filenamet ignoredt ifcfg_file( ( s: /usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyR ! s* c C s� | d k r d } n t | � } | d k r� | j d � | k r� | j d � d k o` | d k r� t j d | | j f � | j d | � | j � n d S( sY Set zone (ZONE=<zone>) in the ifcfg file that uses the interface (DEVICE=<interface>)t t ZONEs Setting ZONE=%s in '%s'N( R R R R t debug1R t sett write( t zoneR R ( ( s: /usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyR ? s !"( t __doc__t __all__R t os.patht firewallR t firewall.core.loggerR t firewall.core.io.ifcfgR R R ( ( ( s: /usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyt <module> s