Viewing File: /usr/lib/python2.7/site-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyc

ó
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
Back to Directory File Manager