%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/DistUpgrade/__pycache__/xorg_fix_proprietary.cpython-312.pyc

�

\Ne���n�ddlZddlZddlZddlZddlZdZefd�Zefd�Zedk(�r�ej�dk(se
d�ejd�dejd<ejejd	d
��ejdejdz�ej j#e�s$ejd
�ejd�ej j%e�dk(r6ejd�ej&e�ejd�edzej(d�zZej,dez�ej.ee�dZ	ed�D�cgc]}|j5�d��c}ZeD]Zedk(s�	dZnesAee�5Zdej?�vrejdez�ed�ddd�yyycc}w#e$r'ejd�ejd�Y��wxYw#1swYyxYw)�Nz/etc/X11/xorg.confc
��tjj|�stjd|z�yg}t|�5}|D]�}|j
d�dj�}|j�jd�re|jd|z�rQtjd|j�z�d|z}tjd	|j�z�|j|���	ddd�t|�5}|j�|k7rptjd
|�d|�d|�d
��t|dzd�5}|j!dj#|��ddd�tj$|dz|�ddd�y#1swY��xYw#1swY�7xYw#1swYyxYw)zf
    this removes old_driver driver from the xorg.conf and substitutes it with
    the new_driver
    �file %s not foundN�#r�driver�"%s"�line '%s' foundz
	Driver	"%s"
�replacing with '%s'�saving new z (z -> �)�	.xorg_fix�w���os�path�exists�logging�warning�open�split�strip�lower�
startswith�endswith�debug�rstrip�append�	readlines�info�write�join�rename)�
old_driver�
new_driver�xorg�content�	xorg_file�line�s�
xorg_fix_files        �B/usr/lib/python3/dist-packages/DistUpgrade/xorg_fix_proprietary.py�replace_driver_from_xorgr,s��
�7�7�>�>�$�����+�d�2�3���G�	
�d��
!�y��		!�D��
�
�3���"�(�(�*�A����	�$�$�X�.��J�J�v�
�2�3��
�
�/�$�+�+�-�?�@�)�J�6���
�
�3�d�k�k�m�C�D��N�N�4� �		!�
!�
�d��0�y���� �G�+��L�L��
�J�8�
9��d�[�(�#�.�
6�-��#�#�B�G�G�G�$4�5�
6��I�I�d�[�(�$�/�
0�0�
!�
!�� 
6�
6��	0�0�s2�B?F&�AF>�!F2�<!F>�&F/�2F;	�7F>�>Gc��tjj|�stjd|z�yg}t|�5}|D]�}|j
d�dj�}|j�jd�re|jd|z�rQtjd|j�z�d|z}tjd	|j�z�|j|���	ddd�t|�5}|j�|k7rmtjd
|�d|�d��t|d
zd�5}|j!dj#|��ddd�tj$|d
z|�ddd�y#1swY��xYw#1swY�7xYw#1swYyxYw)z3
    this comments out a driver from xorg.conf
    rNrrrrrz#%sr	r
z
 (commenting rrr
rr)r#r%r&r'r(r)r*s       r+�comment_out_driver_from_xorgr..s|���7�7�>�>�$�����+�d�2�3���G�	
�d��
!�y��		!�D��
�
�3���"�(�(�*�A����	�$�$�X�.��J�J�v�
�2�3��
�
�/�$�+�+�-�?�@��t�|���
�
�3�d�k�k�m�C�D��N�N�4� �		!�
!�
�d��0�y���� �G�+��L�L��
�,�
-��d�[�(�#�.�
6�-��#�#�B�G�G�G�$4�5�
6��I�I�d�[�(�$�/�
0�0�
!�
!�� 
6�
6��	0�0�s1�B?F#�?F;�!F/�9!F;�#F,�/F8	�4F;�;G�__main__zNeed to run as root�z/usr/bin/do-release-upgradez$/var/log/dist-upgrade/xorg_fixup.logr
)�level�filename�filemodez
%s runningzNo xorg.conf, exitingz xorg.conf is zero size, removingz.dist-upgrade-z
%Y%m%d%H%Mzcreating backup '%s'Fz
/proc/moduleszCan't read /proc/modules�nvidiaTzRemoving nvidia from %s) �sysrr�time�shutil�	XORG_CONFr,r.�__name__�getuid�print�exit�argv�basicConfig�DEBUGrrr�getsize�remove�strftime�backupr�copyr4rr�mods�IOError�m�xorg_conf_file�read)r(s0r+�<module>rJs5���	���
�
!�	�;D�0�<3<�0�:�z���2�9�9�;�!��
�#�$�������0�C�H�H�Q�K��G���g�m�m�!G�!$�&��G�L�L�������+�,�
�7�7�>�>�)�$�����,�-�������
�w�w���y�!�Q�&�����7�8���	�	�)���������)�
)�M�D�M�M�,�,G�
G�F��G�M�M�(�6�1�2��F�K�K�	�6�"�
�F��,0��,A�B�D��
�
��Q��B�������=��F���
�
�)�_�	7���>�.�.�0�0�����6��B�C�,�X�6�	7�	7��U��BC��������/�0���������	7�	7�s0�;
G<�G7�G<�<0H+�7G<�<)H(�'H(�+H4

Zerion Mini Shell 1.0