3
\¼me¡ ã @ s¶ U d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
mZ ddlm
Z
ddlmZ eZd Zd
ddee
geg g d
œZe
eeƒZ ejeƒ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 C sN t jj|jƒ dtƒ}ytj|ƒ W n& tk
rH tj d| t|ƒ ‚ Y nX d S )NÚscriptsz"Failed to run module %s (%s in %s))
ÚosÚpathÚjoinZ get_cpathÚ
SCRIPT_SUBDIRr ZrunpartsÚ ExceptionÚLOGZwarning)r
r r r Z
runparts_path© r ú)/usr/lib/python3.6/cc_scripts_per_boot.pyÚhandle- s r )Ú__doc__Zloggingr Z cloudinitr Zcloudinit.cloudr Zcloudinit.configr Zcloudinit.config.schemar r Zcloudinit.distrosr Zcloudinit.settingsr r
ZMODULE_DESCRIPTIONÚmetaZ getLoggerÚ__name__r r ÚstrÚlistr r r r r Ú