| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/cloudinit/sources/__pycache__/ |
Upload File : |
�
�f� � �@ � d Z ddlZddlZddlmZ ddlmZmZ ddlm Z m
Z
mZ ej e
� ZdZdedefd �Zdefd
�Zdee fd�Zdedefd�Zdefd
�Zdefd�Zdee fd�ZdZdededefd�Z G d� de j6 � Zee j: ffgZd� Zy)zA Datasource to support the Windows Subsystem for Linux platform. � N)�PurePath)�List�cast)�sources�subp�utilz/usr/bin/wslpath�path�returnc �r � t j t d| g� \ }}t |j � � S )a@
Translates a path inside the current WSL instance's filesystem to a
Windows accessible path.
Example:
# Running under an instance named "CoolInstance"
root = wslpath2win("/") # root == "//wsl.localhost/CoolInstance/"
:param path: string representing a Linux path, whether existing or not.
z-am�r �WSLPATH_CMDr �rstrip�r �out�_s �A/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceWSL.py�wsl_path_2_winr s. � � �Y�Y��U�D�1�
2�F�C���C�J�J�L�!�!� c �0 � t d� } | j S )zL
Returns the name of the current WSL instance as seen from outside.
�/)r �name)�
root_net_paths r �
instance_namer # s � � #�3�'�M����r c � � d} d}g }t j � j � D ]'