Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/tuned/profiles/ |
| [Home] [System Details] [Kill Me] |
�
��\c@s6ddlZddlmZdefd��YZdS(i����N(treducetMergercBs)eZdZd�Zd�Zd�ZRS(s0
Tool for merging multiple profiles into one.
cCsdS(N((tself((s9/usr/lib/python2.7/site-packages/tuned/profiles/merger.pyt__init__ scCst|j|�}|S(s�
Merge multiple configurations into one. If there are multiple units of
the same type, option 'devices'
is set for each unit with respect to eliminating any duplicate devices.
(Rt
_merge_two(Rtconfigst
merged_config((s9/usr/lib/python2.7/site-packages/tuned/profiles/merger.pytmergescCs�|jj|j�x�t|jj��D]�\}}|jsM||jkr]||j|<q)|j|j|_|j|j|_|j|j|_|j dk r�|j |j|_ n|jdk r�|j|j|_n|jdk r|j|j|_n|dkr�|j|jj
dd�dk r�|j|jj
dd�}|j|jj|j�||j|jd|j|jd<q)|j|jj|j�q)W|S(s�
Merge two profiles. The configuration of units with matching names are
updated with options
from the newer profile. If the 'replace' options of the newer
unit is 'True', all options from the
older unit are dropped.
tscriptN(toptionstupdatetlisttunitstitemstreplacettypetenabledtdevicestdevices_udev_regextNonet
script_pretscript_posttget(Rt profile_at profile_bt unit_nametunitR((s9/usr/lib/python2.7/site-packages/tuned/profiles/merger.pyRs&".)(t__name__t
__module__t__doc__RRR(((s9/usr/lib/python2.7/site-packages/tuned/profiles/merger.pyRs (tcollectionst functoolsRtobjectR(((s9/usr/lib/python2.7/site-packages/tuned/profiles/merger.pyt<module>s