Ë
    x[hÃ  ã            
       óü   — U d Z ddlZddlZddlmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ degeg dœZeed<    ej0                  e«      ZdZdZdede
defd„Zdede
dede ddf
d„Z!y)z3Install hotplug udev rules if supported and enabledé    N)ÚstagesÚsubpÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚALL_DISTROS)Ú
EventScopeÚ	EventType)ÚPER_INSTANCE)Ú
DataSourceÚcc_install_hotplug)ÚidÚdistrosÚ	frequencyÚactivate_by_schema_keysÚmetaz2/etc/udev/rules.d/90-cloud-init-hook-hotplug.ruleszÒ# Installed by cloud-init due to network hotplug userdata
ACTION!="add|remove", GOTO="cloudinit_end"{extra_rules}
LABEL="cloudinit_hook"
SUBSYSTEM=="net", RUN+="{libexecdir}/hook-hotplug"
LABEL="cloudinit_end"
Ú
datasourceÚcfgÚnetwork_hotplug_enabledc                 óæ  — t         j                  | j                  t         j                  g«      j                  t        j
                  t        «       «      v }t        j                  | |t         j                  t        j
                  ¬«      }|r|s—t        j                  j                  t        «      rFt        j                  d«       t        j                   t        «       t#        j"                  g d¢«       y |rt        j%                  d«       y t        j                  d«       y t#        j&                  d«      st        j                  d«       y | j(                  �| j(                  nd}|rd	|z   }d
}t        j                  j                  |«      sd}t        j+                  d«       t        j,                  t        t.        j1                  ||¬«      ¬«       t#        j"                  g d¢«       y )N)r   r   Úevent_source_typeÚscopez!Uninstalling hotplug, not enabled)ÚudevadmÚcontrolz--reload-ruleszOHotplug is unsupported by current datasource. Udev rules will NOT be installed.z%Skipping hotplug install, not enabledr   z+Skipping hotplug install, udevadm not foundÚ ú
z/usr/libexec/cloud-initz/usr/lib/cloud-initzInstalling hotplug.)Úextra_rulesÚ
libexecdir)ÚfilenameÚcontent)r   ÚHOTPLUGÚget_supported_eventsÚgetr
   ÚNETWORKÚsetr   Úupdate_event_enabledÚosÚpathÚexistsÚHOTPLUG_UDEV_PATHÚLOGÚdebugr   Údel_filer   ÚwarningÚwhichÚextra_hotplug_udev_rulesÚinfoÚ
write_fileÚHOTPLUG_UDEV_RULES_TEMPLATEÚformat)r   r   r   Úhotplug_supportedÚhotplug_enabledr   r   s          úE/usr/lib/python3/dist-packages/cloudinit/config/cc_install_hotplug.pyÚinstall_hotplugr9   %   sˆ  € ô
 "×)Ñ)Ø×'Ñ'¬×):Ñ):Ð(;Ó<×@Ñ@Ü×Ñ¤£ó	
ðÐô
 ×1Ñ1ØØÜ#×+Ñ+Ü× Ñ ô	€Oñ ¡/Ü�7‰7�>‰>Ô+Ô,Ü�I‰IÐ9Ô:Ü�M‰MÔ+Ô,Ü�I‰IÒ>Ô?ð 	ñ %Ü�K‰Kð4ôð 	ô �I‰IÐ=Ô>ØÜ�:‰:�iÔ Ü�	‰	Ð?Ô@Øð ×.Ñ.Ð:ð 	×+Ò+àð ñ
 Ø˜[Ñ(ˆà*€JÜ�7‰7�>‰>˜*Ô%Ø*ˆ
Ü‡H�HÐ"Ô#Ü‡O�OÜ"Ü+×2Ñ2Ø#°
ð 3ó 
õô 	‡I�IÒ6Õ7ó    ÚnameÚcloudÚargsÚreturnc                 ó‚   — d|v xr" d|d   v xr d|d   d   v xr d|d   d   d   v }t        |j                  ||«       y )NÚupdatesÚnetworkÚwhenÚhotplug)r9   r   )r;   r   r<   r=   r   s        r8   ÚhandlerD   [   sh   € à�SÐò 	;Ø˜˜Y™Ð'ò	;à�c˜)‘n YÑ/Ð/ò	;ð ˜˜Y™¨	Ñ2°6Ñ:Ð:ð	 ô �E×$Ñ$ cÐ+BÕCr:   )"Ú__doc__Úloggingr(   Ú	cloudinitr   r   r   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.distrosr	   Úcloudinit.eventr
   r   Úcloudinit.settingsr   Úcloudinit.sourcesr   r   Ú__annotations__Ú	getLoggerÚ__name__r,   r+   r4   Úboolr9   ÚstrÚlistrD   © r:   r8   ú<module>rV      sº   ðâ 9Û Û 	ç (Ñ (Ý !Ý #Ý .Ý )ß 1Ý +Ý (ð Øˆ}ØØ!ñ	€€jó ð €g×Ñ˜Ó!€ð
 IÐ ðÐ ð38Øð38à	ð38ð "ó38ðlD�ð D˜6ð D¨%ð D°tð DÀô Dr:   