Server IP : 209.38.156.173 / Your IP : 216.73.216.128 [ 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 : /snap/core20/2582/usr/lib/python3/dist-packages/cloudinit/net/__pycache__/ |
Upload File : |
U Ӈg� � @ sZ d dl Z d dlZd dlZd dlmZmZmZ e �e�Z G dd� dejj j�Zddd�Z dS )� N)�net�subp�utilc @ s( e Zd Zd dd�Zd dd�Zdd� ZdS )�RendererNc C s� | j �� D ]�\}}d�|�}t�| j|�}|| �� kr<d}nnt|t�r�zdj|d |d d�}W n t k r� t �d|� Y nX |�d�}|r�|d | 7 }|d | j 7 }t�||� q d S )Nzetc/hostname.{}zdhcp zinet {address} {netmask}�address�netmask)r r z#Invalid static configuration for %s�mtuz mtu %d� )Zinterface_configurations�items�formatr �target_path�target�dhcp_interfaces� isinstance�dict�KeyError�LOG�error�get�interface_routesr � write_file)�selfr Zdevice_name�v�if_file�fn�contentr � r �7/usr/lib/python3/dist-packages/cloudinit/net/openbsd.py�write_config s* � � zRenderer.write_configFc C s� t tt�� �d�d �dk�}| js2t�d� d S |rntjddgdd� | � � D ]}tjd d d|gdd� qPnRt jj� � tjdd dgdddgd� tjdddgdddgd� tjddgdd� d S )N�.r � z!openbsd generate postcmd disabledZshz /etc/netstartT)�captureZdhcpleasectlz-wZ30Zroute�del�default� )r! Zrcs�flush)�bool�int�platform�release�splitZ _postcmdsr �debugr r r ZdhcpZIscDhclientZkill_dhcp_client)r �runZhas_dhcpleasectlZ interfacer r r �start_services"