3 \¼me¡ã @s¶UdZddlZddlZddlmZddlmZddlmZddl m Z m Z ddl m Z ddlmZeZd Zd d d ee geggd œZe e eƒZejeƒZdZeeeeddœdd„ZdS)z&Scripts Per Boot: Run per boot scriptséN)Úsubp)ÚCloud)ÚConfig)Ú MetaSchemaÚ get_meta_doc)Ú ALL_DISTROS)Ú PER_ALWAYSzÅAny scripts in the ``scripts/per-boot`` directory on the datasource will be run every time the system boots. Scripts will be run in alphabetical order. This module does not accept any config keys. Zcc_scripts_per_bootzScripts Per BootzRun per boot scripts)ÚidÚnameÚtitleÚ descriptionZdistrosÚ frequencyZexamplesZactivate_by_schema_keyszper-boot)r ÚcfgÚcloudÚargsÚreturnc CsNtjj|jƒdtƒ}ytj|ƒWn&tk rHtj d|t|ƒ‚YnXdS)NÚscriptsz"Failed to run module %s (%s in %s)) ÚosÚpathÚjoinZ get_cpathÚ SCRIPT_SUBDIRrZrunpartsÚ ExceptionÚLOGZwarning)r rrrZ runparts_path©rú)/usr/lib/python3.6/cc_scripts_per_boot.pyÚhandle-sr)Ú__doc__ZloggingrZ cloudinitrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarrZcloudinit.distrosrZcloudinit.settingsrr ZMODULE_DESCRIPTIONÚmetaZ getLoggerÚ__name__rrÚstrÚlistrrrrrÚs,