| 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/net/__pycache__/ |
Upload File : |
�
�f� � � � d dl Z d dlZd dlZd dlmZmZmZ e j e� Z G d� dej j j � Zdd�Z
y)� N)�net�subp�utilc � � e Zd Zd� Zdd�Zd� Zy)�Rendererc � � | j j � D ]� \ }}dj |� }t j | j
|� }|| j
� v rd}nWt |t � rG dj |d |d �� }|j d� }|rd |z z
}d
| j z z
}t j |� �� y # t $ r t j d|� Y �gw xY w)Nzetc/hostname.{}zdhcp
zinet {address} {netmask}�address�netmask)r r
z#Invalid static configuration for %s�mtuz mtu %d�
)�interface_configurations�items�formatr �target_path�target�dhcp_interfaces�
isinstance�dict�KeyError�LOG�error�get�interface_routesr �
write_file)�self�device_name�v�if_file�fn�contentr s �7/usr/lib/python3/dist-packages/cloudinit/net/openbsd.py�write_configzRenderer.write_config
s� � �"�;�;�A�A�C� )�N�K��'�.�.�{�;�G��!�!�$�+�+�w�7�B��d�2�2�4�4�"���A�t�$��8�?�?� !�)��a� �l� @� �G� �e�e�E�l����y�3��.�G��4�$�"7�"7�7�7���O�O�B��(�% )�� � ��I�I�=�{���s �8C�C9�8C9c �H � t t t j � j d� d � dkD � }| j
st j d� y |rJt j ddgd�� | j � D ] }t j d d
d|gd�� � y t j j j � t j g d�ddd
g�� t j g d�ddd
g�� t j ddgd�� y )N�.r � z!openbsd generate postcmd disabled�shz
/etc/netstartT)�capture�dhcpleasectlz-w�30)�route�del�default� )r'