OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : ó +cc @ sy d d l j Z d d l m Z d d l Z d d l Z d d l m Z m Z e j j ƒ Z d e j f d „ ƒ YZ d S( iÿÿÿÿNi ( t base( t Popent PIPEt ScriptPluginc B sV e Z d Z e d „ ƒ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d „ Z RS( sO Plugin for running custom scripts with profile activation and deactivation. c C s i d d 6S( Nt script( t None( t self( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt _get_config_options s c C sE t | _ t | _ | j d d k r8 | j d | _ n g | _ d S( NR ( t Truet _has_static_tuningt Falset _has_dynamic_tuningt optionsR t _scripts( R t instance( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt _instance_init s c C s d S( N( ( R R ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt _instance_cleanup s c C sb t } xU| D]M} t j } | j | j j ƒ ƒ t j d | t | ƒ f ƒ t j d t t | j ƒ ƒ ƒ ƒ y¯ t | g | d t d t d t d | d t d t j j | ƒ ƒ} | j ƒ \ } } t | ƒ rô t j d | | d f ƒ n | j r t j d | | j f ƒ t } n Wq t t f k rY} t j d | | f ƒ t } q Xq W| S( Ns' calling script '%s' with arguments '%s's using environment '%s't stdoutt stderrt close_fdst envt universal_newlinest cwds script '%s' error output: '%s'iÿÿÿÿs# script '%s' returned error code: %ds script '%s' error: %s( R t ost environt updatet _variablest get_envt logt infot strt debugt listt itemsR R t patht dirnamet communicatet lent errort returncodeR t OSErrort IOError( R t scriptst argumentst retR R t proct outt errt e( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt _call_scripts! s, # c C s0 t t | ƒ j | ƒ | j | j d g ƒ d S( Nt start( t superR t _instance_apply_staticR1 R ( R R ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR4 9 s c C s¨ t } t t | ƒ j | | | ƒ t k r3 t } n d g } | rR | d g 7} n | j | j | ƒ t k r‡ t j t j | j ƒ n t j t j | j ƒ t } | S( Nt verifyt ignore_missing( R R3 R t _instance_verify_staticR R1 R R R t constst STR_VERIFY_PROFILE_OKR&