a '¡Dgšã@s”UdZddlZddlmZmZmZddlmZddlm Z ddl m Z ddl m Z e e¡Ze Zdd ge d gd œZe ed <ee eedd œdd„ZdS)z:Bootcmd: run arbitrary commands early in the boot process.éN)ÚsubpÚ temp_utilsÚutil)ÚCloud)ÚConfig)Ú MetaSchema)Ú PER_ALWAYSZ cc_bootcmdÚallÚbootcmd)ÚidZdistrosÚ frequencyZactivate_by_schema_keysÚmeta)ÚnameÚcfgÚcloudÚargsÚreturnc Csd|vrt d|¡dStjddÎ}z*t |d¡}| t |¡¡| ¡Wn8t yˆ}z t  tdt |ƒ¡‚WYd}~n d}~00z6|  ¡}|r¤dt |ƒini}t j d|jg|dd Wn"t yât  td |¡‚Yn0Wdƒn1sø0YdS) Nr z;Skipping module named %s, no 'bootcmd' key in configurationz.sh)ÚsuffixzFailed to shellify bootcmd: %sZ INSTANCE_IDz/bin/shF)Z update_envZcapturezFailed to run bootcmd module %s)ÚLOGÚdebugrZExtendedTemporaryFilerZshellifyÚwriteZ encode_textÚflushÚ ExceptionZlogexcÚstrZget_instance_idrr) rrrrZtmpfZcontentÚeZiidÚenv©rú?/usr/lib/python3.9/site-packages/cloudinit/config/cc_bootcmd.pyÚhandle!s(ÿ  r)Ú__doc__ZloggingZ cloudinitrrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrZ getLoggerÚ__name__rr r Ú__annotations__rÚlistrrrrrÚ s     ü