0x1949 Team - FAZEMRX - MANAGER
Edit File: photon.cpython-310.pyc
o ���fn � @ sl d dl Z d dlmZmZmZmZmZ d dlmZ d dlm Z d dlmZm Z e �e�ZG dd� dej�ZdS )� N)�distros�helpers�net�subp�util)�PackageList)� rhel_util)� PER_ALWAYS�PER_INSTANCEc @ s� e Zd ZdZdZdZdZdeed�iZdZdd � Z d$d d�Z dd � Zd%dd�Zde fdd�Zdd� Zdd� Zd%dd�Zdd� Zdd� Zd&dd�Zd d!�d"d#�ZdS )'�Distroz /etc/hostnamez/etc/systemd/network/z/etc/locale.confz/etc/systemd/resolved.conf�networkd)�resolv_conf_fn�network_conf_dirTc C s0 t j�| |||� t�|�| _d| _dg| _d S )N�photon� systemctl)r r �__init__r �Runners�_runner�osfamily�init_cmd)�self�name�cfg�paths� r �:/usr/lib/python3/dist-packages/cloudinit/distros/photon.pyr s zDistro.__init__c C sn t �d|� ztj||d�\}}|rt �d||� d||fW S d||fW S tjy6 t�t d|� Y dS w )NzAttempting to run: %s)�capturez(Running %s resulted in stderr output: %sTFzCommand %s failed)TNN)�LOG�debugr �warning�ProcessExecutionErrorr �logexc)r �cmdr �out�errr r r �exec_cmd( s ��zDistro.exec_cmdc C s: d}| j �|d�}t�d||� |st�� S t�d� d S )N�disable_fallback_netcfgTz%s value is: %szJSkipping generate_fallback_config. Rely on PhotonOS default network config)�_cfg�getr r r �generate_fallback_config�info)r �keyr&