MINI MINI MANI MO

Path : /usr/lib/python2.7/site-packages/firewall/core/
File Upload :
Current File : //usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyo

ó
dßŲ[c@spdZddgZddlZddlZddlmZddlmZddlm	Z	d„Z
d	„ZdS(
s.Functions to search for and change ifcfg filestsearch_ifcfg_of_interfacetifcfg_set_zone_of_interfacei’’’’N(tconfig(tlog(tifcfgcCstjjtjƒsdSx»ttjtjƒƒD]”}|jdƒsMq2nx5ddddddgD]}|j	|ƒrfqfqfqfWd|kr—q2nt
d	tj|fƒ}|jƒ|jd
ƒ|kr2|Sq2Wdtj|f}tjj|ƒrt
|ƒ}|jƒ|SdS(
s6search ifcfg file for the interface in config.IFCFGDIRsifcfg-s.baks.origs.rpmnews.rpmorigs.rpmsaves-ranget.s%s/%stDEVICEs%s/ifcfg-%sN(
tostpathtexistsRtIFCFGDIRtNonetsortedtlistdirt
startswithtendswithRtreadtget(t	interfacetfilenametignoredt
ifcfg_file((s:/usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyR s*



cCsŸ|dkrd}nt|ƒ}|dk	r›|jdƒ|kr›|jdƒdko`|dkr›tjd||jfƒ|jd|ƒ|jƒndS(sYSet zone (ZONE=<zone>) in the ifcfg file that uses the interface
    (DEVICE=<interface>)ttZONEsSetting ZONE=%s in '%s'N(RRRRtdebug1Rtsettwrite(tzoneRR((s:/usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyR>s	!"(t__doc__t__all__Rtos.pathtfirewallRtfirewall.core.loggerRtfirewall.core.io.ifcfgRRR(((s:/usr/lib/python2.7/site-packages/firewall/core/fw_ifcfg.pyt<module>s	

OHA YOOOO