??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
+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 sa t | _ t | _ | j d d k rT t | j d t ƒ sA t ‚ | j d | _ n g | _ d S( NR (
t Truet _has_static_tuningt Falset _has_dynamic_tuningt optionsR t
isinstancet listt AssertionErrort _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 debugR t 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_staticR3 R ( R R ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR6 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 R5 R t _instance_verify_staticR
R3 R R R t constst STR_VERIFY_PROFILE_OKR( t STR_VERIFY_PROFILE_FAIL( R R R8 t devicesR. t args( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR9 = s c C sU d g } | r | d g } n | j t | j ƒ | ƒ t t | ƒ j | | ƒ d S( Nt stopt
full_rollback( R3 t reversedR R5 R t _instance_unapply_static( R R R@ R> ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyRB L s
( t __name__t
__module__t __doc__t classmethodR R R R3 R6 R9 R
RB ( ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyR s
( t tuned.constsR: t R t
tuned.logst tunedR t
subprocessR R t logst getR t PluginR ( ( ( s? /usr/lib/python2.7/site-packages/tuned/plugins/plugin_script.pyt s