HEX
Server: Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
System: Linux sv2.tribox.net.br 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: bucalon (1051)
PHP: 8.2.13
Disabled: system,exec,shell_exec,popen,passthru,proc_open,posix_getpwnam,posix_getpwuid,posix_kill,pcntl_fork,escapeshellarg,escapeshellcmd,proc_close,dl,show_source,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,pcntl_exec,expect_popen,pcntl_signal_get_handler,pcntl_async_signals,link,symlink,syslog,ld,mb_send_mail,imap_open,imap_mail,libvirt_connect,gnupg_init,stream_socket_sendto,stream_socket_client,parse_ini_file,curl_multi_exec
Upload Files
File: //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