| Server IP : 3.7.136.76 / Your IP : 216.73.216.142 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-39-148 7.0.0-1010-aws #10~24.04.1-Ubuntu SMP PREEMPT Mon Jul 27 17:41:33 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/core22/2955/usr/share/subiquity/console_conf/controllers/__pycache__/ |
Upload File : |
o
K��^ � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m
Z
d dlmZ d dl
mZ d dlmZmZ e�d�Zdd � Zd
d� Zdd
� Zdd� ZdZdZdd� Zdd� ZG dd� de�ZdS )� N)�
host_key_info�get_ips_standalone)�SnapdConnection)�
TuiController)�run_command)�IdentityView� LoginViewz!console_conf.controllers.identityc C s� d} zt | d��}|�� }W d � n1 sw Y W n
ty' Y dS w d}t�|�D ]}|�d�\}}}|dkrD|dkrD dS |dkrM|} |S q/|S )z6 For a ubuntu-core system, return its version or None z/usr/lib/os-release�rN�=�IDzubuntu-core�
VERSION_ID)�open�read�FileNotFoundError�shlex�split� partition)�path�fp�content�version�line�key�_�value� r �9/usr/share/subiquity/console_conf/controllers/identity.py�get_core_version s(
����r c C s t dd�} | �d��� d d S )z Check if device is managed � �/run/snapd.socketzv2/system-info�result�managed)r �get�json)�conr r r �get_managed6 s
r% c C s6 zt �| �}W n
ty Y dS w |j�dd�d S )Nr �,� r )�pwd�getpwnam�KeyError�pw_gecosr )�username�infor r r �get_realname<