?????????? ????????? - ??????????????? - /usr/lib/python3.9/site-packages/firewall/core/__pycache__/fw_ifcfg.cpython-39.pyc
???????
a � i � @ sT d Z ddgZddlZddlZddlmZ ddlmZ ddlm Z dd� Z d d� ZdS ) z.Functions to search for and change ifcfg files�search_ifcfg_of_interface�ifcfg_set_zone_of_interface� N)�config)�log)�ifcfgc C s� t j�tj�sdS tt �tj��D ]`}|�d�s2q"dD ]}|�|�r6q6q6d|v rRq"t dtj|f �}|� � |�d�| kr"| S q"dtj| f }t j�|�r�t |�}|� � |S dS )z6search ifcfg file for the interface in config.IFCFGDIRNzifcfg-)z.bakz.origz.rpmnewz.rpmorigz.rpmsavez-range�.z%s/%sZDEVICEz%s/ifcfg-%s)�os�path�existsr ZIFCFGDIR�sorted�listdir� startswith�endswithr �read�get)� interface�filenameZignored� ifcfg_file� r �:/usr/lib/python3.9/site-packages/firewall/core/fw_ifcfg.pyr ! s( c C sl | du rd} t |�}|durh|�d�| krh|�d�du r@| dksht�d| |jf � |�d| � |�� dS )zYSet zone (ZONE=<zone>) in the ifcfg file that uses the interface (DEVICE=<interface>)N� ZZONEzSetting ZONE=%s in '%s')r r r Zdebug1r �set�write)�zoner r r r r r ? s ��)�__doc__�__all__r Zos.pathZfirewallr Zfirewall.core.loggerr Zfirewall.core.io.ifcfgr r r r r r r �<module> s
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0 |
proxy
|
phpinfo
|
???????????