|
Server IP : 162.241.148.128 / Your IP : 216.73.217.108 Web Server : Apache System : Linux md-ht-9.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : caribhll ( 2226) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /lib/python2.7/site-packages/firewall/core/ |
| [ Home ] | [ C0mmand ] | [ 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