Current File : //usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyo
�
oB�]c@s�ddlZddlZddlZddlmZeje�Zdefd��YZ	de
fd��YZde
fd��YZd	efd
��YZ
defd��YZdS(
i����N(tutiltCustomScriptNotFoundcBseZRS((t__name__t
__module__(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyRstCustomScriptConstantcBs5eZdZdZejjee�ZdZdZ	RS(s/root/.customizationscustomize.shs)/.guest-customization-post-reboot-pendingspost-customize-guest.sh(
RRtCUSTOM_TMP_DIRtCUSTOM_SCRIPT_NAMEtostpathtjoint
CUSTOM_SCRIPTtPOST_CUSTOM_PENDING_MARKERtPOST_CUSTOM_SCRIPT_NAME(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyRs	tRunCustomScriptcBseZd�Zd�ZRS(cCs.||_||_tjj||�|_dS(N(t
scriptnamet	directoryRRR	t
scriptpath(tselfRR((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyt__init__"s		cCs�tjj|j�s+td|j��ntjtj�t	j
dtj�tj|jtj�tj
tj�jdd�}tjtj|dd�dS(Ns3Script %s not found!! Cannot execute custom script!sCopying custom script to %ss
ttmodeid(RRtexistsRRRt
ensure_dirRRtLOGtdebugR
tcopyt	load_filetreplacet
write_file(Rtcontent((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pytprepare_script's	
(RRRR(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyR
!s	tPreCustomScriptcBseZd�ZRS(cCs1tjd�|j�tjtjdg�dS(s7Executing custom script with precustomization argument.s"Executing pre-customization scripttprecustomizationN(RRRRtsubpRR
(R((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pytexecute<s

(RRR"(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyR;stPostCustomScriptcBseZd�Zd�ZRS(cCsAtt|�j||�||_tjj|tj�|_	dS(N(
tsuperR#RtccScriptsDirRRR	RRtccScriptPath(RRRR%((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyRDs
		cCs�|j�tjd|j�tjtjj|j	t
j�|j�tj|j�}tj
|j|jtjB�tjd�tjt
j�dS(s�
        This method copy the post customize run script to
        cc_scripts_per_instance directory and let this
        module to run post custom script.
        s'Copying post customize run script to %ss*Creating post customization pending markerN(RRRR&RRRRR	RRRtstattchmodtst_modetS_IEXECtinfotensure_fileR(Rtst((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyR"Ks
	
	

(RRRR"(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyR#Cs	(tloggingRR't	cloudinitRt	getLoggerRRt	ExceptionRtobjectRR
RR#(((s]/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyt<module>s