| Server IP : 77.68.64.21 / Your IP : 216.73.217.59 Web Server : Apache System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2516497 ( 2094697) PHP Version : 8.3.30 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python2.7/site-packages/firewall/core/ |
Upload File : |
�
�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