+
    ˜qgj"  ã                   ó¼   € ^ RI t ^ RIt^ RIt^ RIHtHt ] P                  ! ]4      t ! R R]	4      t
 ! R R4      t ! R R4      t ! R	 R
]4      t ! R R]4      tR# )é    N)ÚsubpÚutilc                   ó   € ] tR t^tRtR# )ÚCustomScriptNotFound© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú[/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.pyr   r      s   † Ûr   r   c                   ó^   € ] tR t^tRtRt]P                  P                  ]]4      t	Rt
RtRtR# )ÚCustomScriptConstantz/root/.customizationzcustomize.shz)/.guest-customization-post-reboot-pendingzpost-customize-guest.shr   N)r   r	   r
   r   ÚCUSTOM_TMP_DIRÚCUSTOM_SCRIPT_NAMEÚosÚpathÚjoinÚCUSTOM_SCRIPTÚPOST_CUSTOM_PENDING_MARKERÚPOST_CUSTOM_SCRIPT_NAMEr   r   r   r   r   r      s0   † Ø+€Nð (ÐØ—G‘G—L‘L Ð1CÓD€MØ!LÐà7Ôr   r   c                   ó,   a € ] tR t^ t o R tR tRtV tR# )ÚRunCustomScriptc                óf   € Wn         W n        \        P                  P	                  W!4      V n        R # ©N)Ú
scriptnameÚ	directoryr   r   r   Ú
scriptpath)Úselfr   r   s   &&&r   Ú__init__ÚRunCustomScript.__init__!   s    € Ø$ŒØ"ŒÜŸ'™'Ÿ,™, yÓ=ˆŽr   c                ó@  € \         P                  P                  V P                  4      '       g   \	        R V P                  ,          4      h\
        P                  ! \        P                  4       \        P                  R\        P                  4       \
        P                  ! V P                  \        P                  4       \
        P                  ! \        P                  4      P                  RR4      p\
        P                  ! \        P                  VRR7       R# )z3Script %s not found!! Cannot execute custom script!zCopying custom script to %sÚÚ id  )ÚmodeN)r   r   Úexistsr   r   r   Ú
ensure_dirr   r   ÚLOGÚdebugr   ÚcopyÚload_text_fileÚreplaceÚ
write_file)r    Úcontents   & r   Úprepare_scriptÚRunCustomScript.prepare_script&   sÂ   € Ü�w‰w�~‰~˜dŸo™o×.Ò.Ü&ØEØ—/‘/õ"óð ô
 	�ŠÔ,×;Ñ;Ô<ä�	‰	Ø)Ô+?×+MÑ+Mô	
ô 	�	Š	�$—/‘/Ô#7×#EÑ#EÔFô ×%Ò%Ü ×.Ñ.ó
ç
‰'�$˜Ó
ð 	ô 	�ŠÜ ×.Ñ.°¸e÷	
r   )r   r   r   N)r   r	   r
   r   r!   r0   r   Ú__classdictcell__©Ú__classdict__s   @r   r   r       s   ø‡ € ò>÷

ð 
r   r   c                   ó&   a € ] tR t^=t o R tRtV tR# )ÚPreCustomScriptc                óœ   € \         P                  R4       V P                  4        \        P                  ! \        P
                  R.4       R# )z7Executing custom script with precustomization argument.z"Executing pre-customization scriptÚprecustomizationN)r)   r*   r0   r   r   r   )r    s   &r   ÚexecuteÚPreCustomScript.execute>   s4   € ä�	‰	Ð6Ô7Ø×ÑÔÜ�	Š	Ô'×5Ñ5Ð7IÐJÖKr   r   N)r   r	   r
   r   r9   r   r2   r3   s   @r   r6   r6   =   s   ø‡ € ÷Lð Lr   r6   c                   ó8   a a€ ] tR t^Et oV 3R ltR tRtVtV ;t# )ÚPostCustomScriptc                ó    <€ \         \        V `  W4       W0n        \        P
                  P                  V\        P                  4      V n	        R # r   )
Úsuperr<   r!   ÚccScriptsDirr   r   r   r   r   ÚccScriptPath)r    r   r   r?   Ú	__class__s   &&&&€r   r!   ÚPostCustomScript.__init__F   s:   ø€ ÜÔ Ñ.¨zÔEØ(ÔÜŸG™GŸL™LØÔ.×FÑFó
ˆÖr   c                óF  € V P                  4        \        P                  RV P                  4       \        P
                  ! \        P                  P                  V P                  \        P                  4      V P                  4       \        P                  ! V P                  4      p\        P                  ! V P                  VP                  \        P                  ,          4       \        P!                  R4       \        P"                  ! \        P$                  4       R# )z„
This method copy the post customize run script to
cc_scripts_per_instance directory and let this
module to run post custom script.
z'Copying post customize run script to %sz*Creating post customization pending markerN)r0   r)   r*   r@   r   r+   r   r   r   r   r   r   ÚstatÚchmodÚst_modeÚS_IEXECÚinfoÚensure_filer   )r    Ústs   & r   r9   ÚPostCustomScript.executeM   sµ   € ð 	×ÑÔä�	‰	Ð;¸T×=NÑ=NÔOÜ�	Š	Ü�G‰G�L‰LØ—‘Ô 4× LÑ Lóð ×Ñô		
ô �WŠW�T×&Ñ&Ó'ˆÜ
�Š�×"Ñ" B§J¡J´·±Õ$=Ô>Ü�‰Ð=Ô>Ü×ÒÔ-×HÑHÖIr   )r@   r?   )	r   r	   r
   r   r!   r9   r   r2   Ú__classcell__)rA   r4   s   @@r   r<   r<   E   s   ù‡ € õ
÷Jò Jr   r<   )Úloggingr   rD   Ú	cloudinitr   r   Ú	getLoggerr   r)   Ú	Exceptionr   r   r   r6   r<   r   r   r   Ú<module>rQ      s_   ðó Û 	Û ç  à×Ò˜Ó!€ô	˜9ô 	÷8ñ 8÷
ñ 
ô:L�oô LôJ�ö Jr   