Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/tuned/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyo
�
+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_optionsscCsEt|_t|_|jddk	r8|jd|_n	g|_dS(NR(tTruet_has_static_tuningtFalset_has_dynamic_tuningtoptionsRt_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_envtlogtinfotstrtdebugtlisttitemsRRtpathtdirnametcommunicatetlenterrort
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_staticR1R
(RR((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR49scCs�t}tt|�j|||�tkr3t}ndg}|rR|dg7}n|j|j|�tkr�tjt	j
|j�ntjt	j|j�t}|S(Ntverifytignore_missing(
RR3Rt_instance_verify_staticR
R1R
RRtconststSTR_VERIFY_PROFILE_OKR&tSTR_VERIFY_PROFILE_FAIL(RRR6tdevicesR,targs((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR7=s		cCsUdg}|r|dg}n|jt|j�|�tt|�j||�dS(Ntstopt
full_rollback(R1treversedR
R3Rt_instance_unapply_static(RRR>R<((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR@Ls
	(t__name__t
__module__t__doc__tclassmethodRRRR1R4R7R
R@(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR	s	
				(ttuned.constsR8tRt
tuned.logsttunedRt
subprocessRRtlogstgetRtPluginR(((s?/usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt<module>s

ZeroDay Forums Mini