ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/tuned/plugins/
Upload File :
Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyc

�
��*cc@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
Csbt}xU|D]M}tj}|j|jj��tjd|t|�f�tj	dtt
|j����y�t|g|dt
dt
dtd|dtdtjj|��}|j�\}}t|�r�tjd	||d
 f�n|jr tjd||jf�t}nWq
ttfk
rY}	tjd||	f�t}q
Xq
W|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(Rtostenvirontupdatet
_variablestget_envtlogtinfotstrtdebugRtitemsRRtpathtdirnametcommunicatetlenterrort
returncodeR
tOSErrortIOError(
Rtscriptst	argumentstretRRtproctoutterrte((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt
_call_scripts!s,
	#	
cCs0tt|�j|�|j|jdg�dS(Ntstart(tsuperRt_instance_apply_staticR3R(RR((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR69scCs�t}tt|�j|||�tkr3t}ndg}|rR|dg7}n|j|j|�tkr�tjt	j
|j�ntjt	j|j�t}|S(Ntverifytignore_missing(
RR5Rt_instance_verify_staticR
R3RRR tconststSTR_VERIFY_PROFILE_OKR(tSTR_VERIFY_PROFILE_FAIL(RRR8tdevicesR.targs((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR9=s		cCsUdg}|r|dg}n|jt|j�|�tt|�j||�dS(Ntstopt
full_rollback(R3treversedRR5Rt_instance_unapply_static(RRR@R>((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyRBLs
	(t__name__t
__module__t__doc__tclassmethodRRRR3R6R9R
RB(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR	s	
				(ttuned.constsR:tRt
tuned.logsttunedRt
subprocessRRtlogstgetRtPluginR(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt<module>s

Zerion Mini Shell 1.0