403Webshell
Server IP : 156.238.232.47  /  Your IP : 216.73.216.150
Web Server : nginx/1.25.3
System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : www ( 1000)
PHP Version : 8.3.25
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.7/site-packages/cloudinit/cmd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyc
�
oB�]c@s�dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZmZdZdZd	Zd
ZdZdZdd
�Zd�Zd�Zd�Zd�Zedkr�e�ndS(sFDefine 'status' utility and handler as part of cloud-init commandline.i����N(tgmtimetstrftimetsleep(tuses_systemd(tInit(tget_cmdlinet	load_filet	load_jsons/etc/cloud/cloud-init.disabledsnot runtrunningtdoneterrortdisabledc	Csi|s!tjdddd�}n|jddddd	td
d�|jdd
ddd	td
d�|S(s%Build or extend an arg parser for status utility.

    @param parser: Optional existing ArgumentParser instance representing the
        status subcommand which will be extended to support the args of
        this utility.

    @returns: ArgumentParser with proper argument configuration.
    tprogtstatustdescriptionsReport run status of cloud inits-ls--longtactiont
store_truetdefaultthelpsJReport long format of statuses including run stage name and error messagess-ws--waits'Block waiting on cloud-init to complete(targparsetArgumentParsertadd_argumenttFalse(tparser((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyt
get_parsers		cCstdg�}|j�t|j�\}}}|jr�xU|ttfkr�tjj	d�tjj
�t|j�\}}}td�q=Wtjj	d�n|jr�dj
|�GH|r�dj
|�GHndj
|�GHndj
|�GH|tkrdSd	S(
s4Handle calls to 'cloud-init status' as a subcommand.tds_depst.g�?s
sstatus: {0}s	time: {0}sdetail:
{0}ii(Rtread_cfgt_get_status_detailstpathstwaittSTATUS_ENABLED_NOT_RUNtSTATUS_RUNNINGtsyststdouttwritetflushRtlongtformattSTATUS_ERROR(tnametargstinitR
t
status_detailttime((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pythandle_status_args1s"
	
	cCs�t}t�j�}t�s'd}n�d|kr<d}n~tjj|�rft}dj|�}nTd|kr�t}d}n9tjjtjj	|j
d��s�t}d}nd	}||fS(
sReport whether cloud-init is disabled.

    @param disable_file: The path to the cloud-init disable file.
    @param paths: An initialized cloudinit.helpers.Paths object.
    @returns: A tuple containing (bool, reason) about cloud-init's status and
    why.
    sCloud-init enabled on sysvinitscloud-init=enableds<Cloud-init enabled by kernel command line cloud-init=enabledsCloud-init disabled by {0}scloud-init=disableds;Cloud-init disabled by kernel parameter cloud-init=disabledtenableds+Cloud-init disabled by cloud-init-generators2Cloud-init enabled by systemd cloud-init-generator(RRtsplitRtostpathtexiststTrueR&tjointrun_dir(tdisable_fileRtis_disabledt
cmdline_partstreason((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyt_is_cloudinit_disabledIs"				$	cCs5t}d}i}tjj|jd�}tjj|jd�}tt|�\}}|rlt}|}ntjj|�r�tjj|�s�t	}nt
t|��jdi�}ng}d}	x�t
|j��D]�\}
}|
dkr|r�t	}dj|�}q�q�|
dkr'|}q�t|t�r�|j|jd	g��|jd
�pad}|jd�pvd}
|
dkr�|dkr�t	}nt||
�}||	kr�|}	q�q�q�W|r�t}dj|�}n!|tkr|	dkrt}n|	r"td
t|	��}nd}|||fS(s�Return a 3-tuple of status, status_details and time of last event.

    @param paths: An initialized cloudinit.helpers.paths object.

    Values are obtained from parsing paths.run_dir/status.json.
    tsstatus.jsonsresult.jsontv1itstagesRunning in stage: {0}t
datasourceterrorststarttfinisheds
s%a, %d %b %Y %H:%M:%S %z(RR0R1R4R5R:tCLOUDINIT_DISABLED_FILEtSTATUS_DISABLEDR2R RRtgettsortedtitemsR&t
isinstancetdicttextendtmaxR'tSTATUS_DONERR(RR
R+t	status_v1tstatus_filetresult_fileR7R9R?tlatest_eventtkeytvalueR@RAt
event_timeR,((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyResR		!			cCs)t�}tjtd|j���dS(s$Tool to report status of cloud-init.R
N(RR!texitR-t
parse_args(R((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pytmain�s	t__main__(t__doc__RR0R!R,RRRtcloudinit.distrosRtcloudinit.stagesRtcloudinit.utilRRRRBRR RKR'RCtNoneRR-R:RRUt__name__(((s8/usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyt<module>s(			5	

Youez - 2016 - github.com/yon3zu
LinuXploit