Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/sos/policies/distros/__pycache__/ |
Upload File : |
o ���b� � @ s4 d dl mZ d dlmZ d dlZG dd� de�ZdS )� )�UbuntuPlugin)�DebianPolicyNc s| e Zd ZdZdZddgZdZdZdZdZ dZ d� fdd� Zeddd��Z dd� Z� fdd�Zdd� Z� fdd�Z� ZS )�UbuntuPolicy�Ubuntu� Canonical)zCommunity Websitezhttps://www.ubuntu.com/)zCommercial Supportzhttps://www.canonical.comzb/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/sbin:/usr/local/bin:/snap/binz,https://files.support.canonical.com/uploads/�ubuntu�putNTc s, t t| �j||||d� | jtg7 _d S )N)�sysroot�init� probe_runtime�remote_exec)�superr �__init__�valid_subclassesr )�selfr r r r �� __class__� �=/usr/lib/python3/dist-packages/sos/policies/distros/ubuntu.pyr s �zUbuntuPolicy.__init__� c C sb |r| j |v S ztdd��}d|�� v W d � W S 1 sw Y W dS ty0 Y dS w )z[This method checks to see if we are running on Ubuntu. It returns True or False.�/etc/lsb-release�rr NF)�distro�open�read�IOError)�cls�remote�fpr r r �check$ s (��zUbuntuPolicy.checkc C s� z<t dd��,}|�� }|D ]}d|v r(t|�d�d �� � W d � W S q W d � W dS 1 s5w Y W dS ttfyH Y dS w )z7 Returns the version stated in DISTRIB_RELEASE r r �DISTRIB_RELEASE�=� NF)r � readlines�int�split�stripr � ValueError)r r �lines�liner r r �dist_version2 s �� ���zUbuntuPolicy.dist_versionc s( | j �| j�r | j| jfS tt| ��� S �N)� upload_url� startswith�_upload_url�_upload_user�_upload_passwordr r �get_upload_https_auth�r r r r r1 ? s z"UbuntuPolicy.get_upload_https_authc C s | j �| j�r dS | �� S )NzCanonical Support File Server)r, r- r. �get_upload_urlr2 r r r �get_upload_url_stringE s z"UbuntuPolicy.get_upload_url_stringc sJ | j r | j �| j�r| js| jS tj�| j�}| j| S tt| �� � d S r+ ) r, r- r. �upload_archive_name�os�path�basenamer r r3 )r �fnamer r r r3 K s zUbuntuPolicy.get_upload_url)NNTN)r )�__name__� __module__�__qualname__r �vendor�vendor_urls�PATHr. r/ r0 �_upload_methodr �classmethodr r* r1 r4 r3 � __classcell__r r r r r s( �� r )�sos.report.pluginsr �sos.policies.distros.debianr r6 r r r r r �<module> s