📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/shelley/public_html/shelleycutler.com/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib
›
python3.9
›
site-packages
›
cloudinit
›
handlers
›
📁 __pycache__
📍
Lokasi:
/usr/lib/python3.9/site-packages/cloudinit/handlers/__pycache__
💾
Free:
45.4 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: boot_hook.cpython-39.opt-1.pyc
a '�Dg� � @ sP d dl Z d dlZd dlmZmZmZ d dlmZ e �e �Z G dd� dej�ZdS )� N)�handlers�subp�util)� PER_ALWAYSc @ s* e Zd ZdgZdd� Zdd� Zdd� ZdS ) �BootHookPartHandlerz#cloud-boothookc K s2 t j�| t� |�d�| _d | _|r.|�� | _d S )NZ boothooks)r �Handler�__init__r Z get_ipath�boothook_dir�instance_idZget_instance_id)�self�pathsZ datasource�_kwargs� r �@/usr/lib/python3.9/site-packages/cloudinit/handlers/boot_hook.pyr s zBootHookPartHandler.__init__c C sJ t �|�}tj�| j|�}t jt �|�| jd d�}t � ||� � d� |S )Nr )�prefixi� )r Zclean_filename�os�path�joinr Zstrip_prefix_suffixZdos2unix�prefixesZ write_file�lstrip)r �payload�filename�filepath�contentsr r r �_write_part s �zBootHookPartHandler._write_partc C s� |t jv rd S | �||�}z8| jr0dt| j�ini }t�d� tj|g|dd� W n@ tjyt t � td|� Y n ty� t � td|� Y n0 d S )NZINSTANCE_IDzExecuting boothookF)Z update_envZcapturez#Boothooks script %s execution errorz'Boothooks unknown error when running %s)r ZCONTENT_SIGNALSr r �str�LOG�debugr ZProcessExecutionErrorr Zlogexc� Exception)r �dataZctyper r Z frequencyr �envr r r �handle_part) s �� �zBootHookPartHandler.handle_partN)�__name__� __module__�__qualname__r r r r! r r r r r s r ) Zloggingr Z cloudinitr r r Zcloudinit.settingsr Z getLoggerr"