MINI MINI MANI MO

Path : /usr/lib/python2.7/site-packages/tuned/plugins/
File Upload :
Current File : //usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyc

ó
©=[c@syddljZddlmZddlZddlZddlmZm	Z	ej
jƒZdej
fd„ƒYZdS(iÿÿÿÿNi(tbase(tPopentPIPEtScriptPlugincBsVeZdZed„ƒZd„Zd„Zd„Zd„Zd„Z	e
d„ZRS(sO
	Plugin for running custom scripts with profile activation and deactivation.
	cCsidd6S(Ntscript(tNone(tself((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt_get_config_optionsscCsat|_t|_|jddk	rTt|jdtƒsAt‚|jd|_	n	g|_	dS(NR(
tTruet_has_static_tuningtFalset_has_dynamic_tuningtoptionsRt
isinstancetlisttAssertionErrort_scripts(Rtinstance((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt_instance_inits		cCsdS(N((RR((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt_instance_cleanupsc	CsRxK|D]C}tj}|j|jjƒƒtjd|t|ƒfƒtjdtt	|j
ƒƒƒƒyªt|g|dtdtdt
d|dt
dtjj|ƒƒ}|jƒ\}}t|ƒrîtjd	||d
 fƒn|jrtjd||jfƒtSWqttfk
rI}tjd||fƒtSXqWt
S(
Ns'calling script '%s' with arguments '%s'susing environment '%s'tstdouttstderrt	close_fdstenvtuniversal_newlinestcwdsscript '%s' error output: '%s'iÿÿÿÿs#script '%s' returned error code: %dsscript '%s' error: %s(tostenvirontupdatet
_variablestget_envtlogtinfotstrtdebugRtitemsRRRtpathtdirnametcommunicatetlenterrort
returncodeR
tOSErrortIOError(	Rtscriptst	argumentsRRtproctoutterrte((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt
_call_scripts!s*
	#		cCs0tt|ƒj|ƒ|j|jdgƒdS(Ntstart(tsuperRt_instance_apply_staticR2R(RR((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR58scCs¥t}tt|ƒj||ƒtkr0t}ndg}|rO|dg7}n|j|j|ƒtkr„tjt	j
|jƒntjt	j|jƒt}|S(Ntverifytignore_missing(
RR4Rt_instance_verify_staticR
R2RRR tconststSTR_VERIFY_PROFILE_OKR(tSTR_VERIFY_PROFILE_FAIL(RRR7trettargs((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR8<s!		cCsUdg}|r|dg}n|jt|jƒ|ƒtt|ƒj||ƒdS(Ntstopt
full_rollback(R2treversedRR4Rt_instance_unapply_static(RRR?R=((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyRAJs
	(t__name__t
__module__t__doc__tclassmethodRRRR2R5R8R
RA(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR	s	
				(ttuned.constsR9tRt
tuned.logsttunedRt
subprocessRRtlogstgetRtPluginR(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt<module>s

OHA YOOOO