+
    ˜qgjîL  ã                   óÀ  a € R0 t60 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
HtHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt RR	R
R.R]R. /t] ^ k RtRtRtRtR1tR2t]P@                  ! ]!4      t"R t#R t$R t%R3R lt&R3R lt'R R lt(R4R lt)R R lt*R5R lt+R t,R R lt-R  R! lt.R" R# lt/R$ R% lt0R& R' lt1R( R) lt2R* R+ lt3R3R, R- llt4R. R/ lt5R# )6z-Mounts: Configure mount points and swap filesN)ÚDictÚListÚOptionalÚTupleÚcast)ÚperformanceÚsubpÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚPER_INSTANCEÚidÚ	cc_mountsÚdistrosÚallÚ	frequencyÚactivate_by_schema_keysz&^([x]{0,1}[shv]d[a-z][0-9]*|sr[0-9]+)$z^.+:.*z
/etc/fstabzcomment=cloudconfigc                 óŽ   € V R9   d   R# R F5  pV P                  V4      '       g   K  V P                  R4      R8X  g   K4   R# 	  R# )ÚamiTÚ:F)r   ÚrootÚswap)Ú	ephemeralÚebséÿÿÿÿ)Ú
startswithÚfind)ÚnameÚenumnames   & Ú</usr/lib/python3/dist-packages/cloudinit/config/cc_mounts.pyÚis_meta_device_namer!   ,   s@   € àÐ&Ô&Ùó )ˆØ�?‰?˜8×$Ô$¨¯©°3«¸2Ö)=Úñ )ñ ó    c                 óL   € \         P                  ! \        V 4      '       d   R # R# )TF)ÚreÚmatchÚNETWORK_NAME_FILTER)r   s   &r    Úis_network_devicer'   8   s   € ä	‡x‚xÔ# T×*Ò*ÙÙr"   c                 ó¦   € \        V4      R V: 2RV: 2.pV F4  pV : V: 2p\        P                  P                  V4      '       g   K2  Vu # 	  R# )Úpz-partN)ÚstrÚosÚpathÚexists)Údevice_pathÚpartition_numberÚpotential_suffixesÚsuffixÚpotential_partition_devices   &&   r    Ú_get_nth_partition_for_devicer3   ?   sU   € äÐÔÚ!Ñ#Ú%Ð'ðÐó
 %ˆÚ/:ºFÐ%CÐ"Ü�7‰7�>‰>Ð4×5Ô5Ø-Ò-ñ %ñ r"   c                 ó˜  € \         P                  P                  V 4      P                  R 4      R,          p\         P                  P	                  RV4      pVeT   \         P                  P	                  V\         P                  P                  V4      P                  R 4      R,          4      p\         P                  P                  V4      # )Ú/z/sys/block/r   )r+   r,   ÚrealpathÚsplitÚjoinr-   )r.   Úpartition_pathÚdevice_nameÚsys_paths   &&  r    Ú_is_block_devicer<   L   s‹   € Ü—'‘'×"Ñ" ;Ó/×5Ñ5°cÓ:¸2Õ>€KÜ�w‰w�|‰|˜M¨;Ó7€HØÒ!Ü—7‘7—<‘<Ø”b—g‘g×&Ñ& ~Ó6×<Ñ<¸SÓAÀ"ÕEó
ˆô �7‰7�>‰>˜(Ó#Ð#r"   c                 ó¬  € \         P                  R V 4       T pVR8X  d   Rp\         P                  R4       \        V 4      '       d   V # \        P                  ! V4      w  rETpV'       d.   VP                  WD4      pWd8w  d   \         P                  RWd4       \        V4      '       dG   V! V4      pV'       g   R# VP                  R4      '       g   RV: 2p\         P                  RWd4       M'\        P                  ! \        V 4      '       d   RV: 2pRpVf   \        V^4      pM\        WE4      pVf   R# \        WG4      '       d	   Ve   V# V# R# )	z+Attempting to determine the real name of %sr   Ú
ephemeral0z2Adjusted mount option from ephemeral to ephemeral0zMapped device alias %s to %sNr5   z/dev/zMapped metadata name %s to %s)ÚLOGÚdebugr'   r	   Úexpand_dotted_devnameÚgetr!   r   r$   r%   ÚDEVICE_NAME_FILTERr3   r<   )Ú	startnameÚtransformerÚaliasesÚdevnamer.   r/   Úorigr9   s   &&&     r    Úsanitize_devnamerI   V   s-  € Ü‡I�IÐ;¸YÔGð €GØ�+ÔØˆÜ�	‰	ÐFÔGä˜×#Ò#ØÐä$(×$>Ò$>¸wÓ$GÑ!€KØ€DçØ—k‘k +Ó;ˆØÔÜ�I‰IÐ4°dÔHä˜;×'Ò'Ù! +Ó.ˆßÙØ×%Ñ% c×*Ó*Ú'2Ð4ˆKÜ�	‰	Ð1°4ÕEä�8Š8Ô&¨	×2Ó2Ú'2Ð4ˆKà€NØÒÜ6°{ÀAÓF‰ä6Øó
ˆð Ò!Ùä˜×4Ò4ØÒ%Ø!Ð!ØÐÙr"   c                ó€   € V ^8„  d   QhR\         R\        \         ,          R\        \         \         3,          R\        /# )é   ÚoriginalÚ	sanitizedÚ
fstab_devsÚreturn)r*   r   r   Úbool)Úformats   "r    Ú__annotate__rR   ‡   s8   € ÷ ñ ÜðÜ&¤s�mðÜ9=¼cÄ3¸h½ðä	ñr"   c                óÀ   € W8w  d   \         P                  RW4       Vf   \         P                  RV 4       R# W9   d    \         P                  RVW!,          4       R# R# )z*Get if the sanitized device name is valid.zchanged %s => %sz+Ignoring nonexistent default named mount %sFz&Device %s already defined in fstab: %sT)r?   r@   )rL   rM   rN   s   &&&r    Úsanitized_devname_is_validrT   ‡   sW   € ð ÔÜ�	‰	Ð$ hÔ:ØÒÜ�	‰	Ð?ÀÔJÙØ	Ô	 Ü�	‰	Ø4ØØÕ!ô	
ñ
 Ùr"   c           	      ó˜  € V f   \         P                  ! 4       R,          p V ^,          pRRRVRV /pVf   Vf   TpM†V'       dy   \        P                  ! V4      pVP                  VP
                  ,          pWdR&   Vf   \        \        V^,          4      V4      pM&WR,          8”  d   \        VR,          4      pMVf   TpWR&   V ^\        ,          8  d   T pMUV ^\        ,          8  d   ^\        ,          pM5\        \        P                  ! V \        ,          4      4      \        ,          p\        Wq4      pW„R&   / p	VP                  4        F7  w  r«\        V\        4      '       d   R	V\        ,          ,          Wš&   K3  W¹V
&   K9  	  \        P!                  R
V	R,          V	R,          V	R,          V	R,          V	R,          4       V# )NÚtotalÚavailÚnaÚmax_inÚmemgÍÌÌÌÌÌì?ÚmaxÚsizez%s MBzCsuggest %s swap for %s memory with '%s' disk given max=%s [max=%s]')r	   Úread_meminfor+   ÚstatvfsÚf_frsizeÚf_bfreeÚminÚintÚGBÚroundÚmathÚsqrtÚitemsÚ
isinstanceÚMBr?   r@   )ÚmemsizeÚmaxsizeÚfsysÚsugg_maxÚinfor^   rW   Úminsizer\   ÚpinfoÚkÚvs   &&&         r    Úsuggested_swapsizers   š   s{  € à‚Ü×#Ò#Ó% gÕ.ˆà˜�{€Hà�T˜8 W¨e°WÐ=€Dà‚|˜šà‰ß	Ü—*’*˜TÓ"ˆØ× Ñ  7§?¡?Õ2ˆØˆW‰àŠ?äœ#˜e a�i›.¨(Ó3‰GØ �Ô&ä˜% #�+Ó&ˆGøØ	ŠØˆàˆ�Kà�”R•ÔØ‰Ø	�2œ•7Ô	Ø”b•&‰äœŸ	š	 '¬B¥,Ó/Ó0´2Õ5ˆäˆwÓ €Dàˆ�Là€EØ—
‘
–‰ˆÜ�aœ×ÒØ !¤b¥&Õ)ˆE‹Hà�!‹Hñ	 ô ‡I�IØMØˆf�Øˆe�Øˆg�Øˆh�Øˆe�ôð €Kr"   c                ó4   € V ^8„  d   QhR\         R\         RR/# )rK   Úfnamer\   rO   N)r*   )rQ   s   "r    rR   rR   Ó   s!   € ÷ ;ñ ;œ3ð ;¤cð ;¨dñ ;r"   c                ó  aa€ RoVV3R lp\         P                  P                  V 4      p\        P                  ! V4       \        P
                  ! V4      ^,          oSR8X  d4   \        P                  ! RRRV .4       \        P                  ! RRV .4       SR	8X  d%   \        P                  ! 4       R8  d   V! WR
4       M
 V! WR4       \         P                  P                  V 4      '       d   \        P                  ! V R4        \        P                  ! RV .4       R#   \        P                   d"    \        P                  R4       T! YR
4        LŒi ; i  \        P                   d    \        P                  ! T 4       h i ; i)zSize is in MiB.z6Failed to create swapfile '%s' of size %sMB via %s: %sc                 ó�  <€ \         P                  R V SV4       VR8X  d   RRRV,          V .pM3VR8X  d   RRRV ,          RRV,          .pM\        P                  ! R	4      h \        P                  ! VR
R7       R#   \        P                   d4   p\         P	                  SYY$4       \
        P                  ! T 4       h Rp?ii ; i)z3Creating swapfile in '%s' on fstype '%s' using '%s'Ú	fallocatez-lz%sMÚddzif=/dev/zerozof=%szbs=1Mzcount=%sz:Missing dependency: 'dd' and 'fallocate' are not availableT)ÚcaptureN)r?   r@   r   ÚProcessExecutionErrorrn   r	   Údel_file)ru   r\   ÚmethodÚcmdÚeÚerrmsgÚfstypes   &&&  €€r    Úcreate_swapÚ$create_swapfile.<locals>.create_swapØ   s½   ø€ Ü�	‰	ØAØØØô		
ð �[Ô Ø  e¨d¥l°EÐ:‰CØ�tŒ^àØØ˜%•ØØ˜TÕ!ð‰Cô ×,Ò,ØLóð ð	Ü�IŠI�c 4×(øÜ×)Ñ)ô 	Ü�H‰H�V˜U¨&Ô4Ü�MŠM˜%Ô Øûð	ús   Á#A= Á=CÂ.C Ã CÚbtrfsÚtruncatez-sÚ0Úchattrz+CÚxfsry   rx   z4fallocate swap creation failed, will attempt with ddi€  ÚmkswapN)é   é   )r+   r,   Údirnamer	   Ú
ensure_dirÚget_mount_infor   Úkernel_versionr{   r?   rn   r-   Úchmodr|   )ru   r\   r‚   Úswap_dirr€   r�   s   &&  @@r    Úcreate_swapfiler’   Ó   s1  ù€ ð F€Föô< �w‰w�‰˜uÓ%€HÜ‡O‚O�HÔä× Ò  Ó*¨1Õ-€Fà�ÔÜ�	Š	�:˜t S¨%Ð0Ô1Ü�	Š	�8˜T 5Ð)Ô*à�„œ4×.Ò.Ó0°7Ô:Ù�E Õ&ð	+Ù˜ [Ô1ô
 
‡w�w‡~�~�e×ÒÜ�
Š
�5˜%Ô ðÜ�	Š	�8˜UÐ#Ö$øô ×)Ñ)ô 	+Ü�H‰HÐKÔLÙ˜ TÖ*ð	+ûô ×%Ñ%ô Ü�Š�eÔØðús   Ã	D$ Ä
E Ä$3EÅEÅ-F
c                óN  € \         P                  P                  V 4      p\        V4      P	                  4       R8X  dA    \
        P                  ! 4       R,          p\
        P                  ! T4       \        Y2TR7      p\        \        VR,          4      4      pV'       g   \        P                  R4       R# \        P                  ! R4      ;_uu_ 4        \        W4       RRR4       V #   \         d    \        P                  R4        R# i ; i  + '       g   i     T # ; i)	z€
fname: full path string of filename to setup
size: the size to create. set to "auto" for recommended
maxsize: the maximum size
ÚautorV   z)Not creating swap: failed to read meminfoN)rl   rk   rj   z'Not creating swap: suggested size was 0zSetting up swap fileé   )r+   r,   rŒ   r*   Úlowerr	   r]   ÚIOErrorr?   r@   r�   rs   rb   r   ÚTimedr’   )ru   r\   rk   r‘   rj   Úmibsizes   &&&   r    Úsetup_swapfilerš     sÝ   € ô �w‰w�‰˜uÓ%€HÜ
ˆ4ƒy‡�Ó˜FÔ"ð	Ü×'Ò'Ó)¨'Õ2ˆGô
 	�Š˜Ô!Ü!Ø°Gô
ˆô ”#�d˜e•nÓ%Ó&€GßÜ�	‰	Ð;Ô<Ùä	×	Ò	Ð1×	2Õ	2Ü˜Ô'÷ 
3ð €Løô# ô 	Ü�I‰IÐAÔBÚð	ú÷ 
3Ö	2ð €Lús   ¿C, ÃDÃ, DÄDÄD$	c                óX  € \        V \        4      '       g   \        P                  R4       R# V P	                  RR4      pV P	                  R^ 4      pV P	                  RR4      pV'       d	   V'       g   \        P                  R4       R# \        P                  P                  V4      '       d¸   \        P                  P                  R4      '       g   \        P                  R	V4       V#  \        P                  ! R4      P                  4        F;  pVP                  VR
,           4      '       g   K#  \        P                  RV4       Vu # 	  \        P                  RV4        \        V\        4      '       d   VR8w  d   \        P                  ! V4      p\        V\        4      '       d   \        P                  ! V4      p\!        WVR7      #   \         d    \        P                  RT4       Tu # i ; i  \         d"   p\        P                  RT4        Rp?R# Rp?ii ; i)zYhandle the swap config, calling setup_swap if necessary.
return None or (filename, size)
z%input for swap config was not a dict.NÚfilenamez	/swap.imgr\   rk   zno need to setup swapz/proc/swapsz:swap file %s exists, but no /proc/swaps exists, being safeÚ zswap file %s already in usez+swap file %s exists, but not in /proc/swapsz.swap file %s exists. Error reading /proc/swapsr”   )ru   r\   rk   zfailed to setup swap: %s)rh   Údictr?   ÚwarningrB   r@   r+   r,   r-   r	   Úload_text_fileÚ
splitlinesr   Ú	Exceptionr*   Úhuman2bytesrš   )Úswapcfgru   r\   rk   Úliner   s   &     r    Úhandle_swapcfgr¦   /  s¢  € ô �gœt×$Ò$Ü�‰Ð;Ô<Ùà�K‰K˜
 KÓ0€EØ�;‰;�v˜qÓ!€DØ�k‰k˜) TÓ*€Gç—UÜ�	‰	Ð)Ô*Ùä	‡w�w‡~�~�e×ÒÜ�w‰w�~‰~˜m×,Ò,Ü�I‰IØLØôð ˆLð
	Ü×+Ò+¨MÓ:×EÑEÖG�Ø—?‘? 5¨3¥;×/Ô/Ü—I‘IÐ;¸UÔCØ ’Lñ Hô �I‰IÐCÀUÔKð3Ü�dœC× Ò  T¨V¤^Ü×#Ò# DÓ)ˆDÜ�gœs×#Ò#Ü×&Ò& wÓ/ˆGÜ E¸gÔFÐFøô ô 	Ü�K‰KØ@À%ôð ŠLð		ûô ô 3Ü�‰Ð.°×2Ð2áûð3ús8   Ã.AG Ä5G ÅG Å(A+G= Ç#G:Ç9G:Ç=H)ÈH$È$H)c                óž   € V ^8„  d   QhR\         \        \        ,          \        \        \        3,          \        \        ,          3,          /# )rK   rO   )r   r   r*   r   )rQ   s   "r    rR   rR   _  s/   € ÷ 2ñ 2”Uœ4¤�9¤d¬3´¨8¥n´d¼3µiÐ?Õ@ñ 2r"   c                 ó–  € . p / p. p\         P                  P                  \        4      '       d˜   \        P
                  ! \        4      P                  4        Fk  p\        V9   d   VP                  V4       K!  VP                  4       pV'       g   K;  W1\        P                  ! V^ ,          4      &   V P                  V4       Km  	  WV3# )aW  Parse /etc/fstab.

Parse fstab, ignoring any lines containing "comment=cloudconfig".
:return: A 3-tuple containing:
    - A list of lines exactly as they appear in fstab
    - A dictionary with key being the first token in the line
      and value being the entire line
    - A list of any lines that were ignored due to "comment=cloudconfig"
)r+   r,   r-   Ú
FSTAB_PATHr	   r    r¡   ÚMNT_COMMENTÚappendr7   Úunescape_fstab_field)Úfstab_linesrN   Úfstab_removedr¥   Útokss        r    Úparse_fstabr°   _  s    € ð €KØ€JØ€Mä	‡w�w‡~�~”j×!Ò!Ü×'Ò'¬
Ó3×>Ñ>Ö@ˆDÜ˜dÔ"Ø×$Ñ$ TÔ*ÙØ—:‘:“<ˆDß‰tØAEœ4×4Ò4°T¸!µWÓ=Ñ>Ø×"Ñ" 4Ö(ñ Að  MÐ1Ð1r"   c                óT  € V ^8„  d   QhR\         \        \         \        \        ,          ,          ,          ,          R\        \        \        3,          R\        \        \        3,          R\         \        \        ,          ,          R\        R\         \         \        ,          ,          /# )rK   ÚmountsrN   Údevice_aliasesÚdefault_fieldsÚcloudrO   )r   r   r*   r   r
   )rQ   s   "r    rR   rR   y  sx   € ÷ +ñ +Ü”œ$œx¬�}Õ-Õ.Õ/ð+ä”Sœ#�X•ð+ô œœc˜•Nð+ô œ¤#�Õ'ð	+ô
 ð+ô 
Œ$Œs�)…_ñ+r"   c                óÎ  € . pV  FÜ  p\        V\        4      '       g   \        P                  RV4       K1  \	        V^ ,          4      p\        WtP                  VR7      p\        WxV4      '       d   V.VR,          ,           p	MTp	\        V	4       F(  w  r«Vf   W:,          Wš&   K  \	        Wš,          4      Wš&   K*  	  W“\        V	4      R ,          p	VP                  V	4       KÞ  	  V# )zÿSanitize mounts to ensure we can work with devices in config.

Specifically:
 - Ensure the mounts configuration is a list of lists
 - Transform and sanitize device names
 - Ensure all tokens are strings
 - Add default options to any lines without options
z%Mount option not a list, ignoring: %s©rF   :é   NNN)rh   Úlistr?   rŸ   r*   rI   Údevice_name_to_devicerT   Ú	enumerateÚlenr«   )r²   rN   r³   r´   rµ   Úupdated_linesr¥   ÚstartÚsanitized_devnameÚupdated_lineÚindexÚtokens   &&&&&       r    Úsanitize_mounts_configurationrÃ   y  sÚ   € ð €MÛˆä˜$¤×%Ò%Ü�K‰KÐ?ÀÔFÙä�D˜•G“ˆÜ,Ø×.Ñ.¸ô
Ðô & eÀ
×KÒKØ-Ð.°°bµÕ9‰LàˆLô & lÖ3‰LˆEØŠ}Ø&4Õ&;�Ó#ä&)¨,Õ*=Ó&>�Ó#ñ	 4ð 	¤s¨<Ó'8Ð':Ð;Õ;ˆà×Ñ˜\Ö*ñ5 ð6 Ðr"   c                óˆ   € V ^8„  d   QhR\         \         \        ,          ,          R\         \         \        ,          ,          /# )rK   r²   rO   ©r   r*   )rQ   s   "r    rR   rR   §  s*   € ÷ ñ ¤t¬D´­I¥ð ¼4ÄÄSÅ	½?ñ r"   c                ó
  € . p. pV RRR1,           Fd  pV^,          e   V^ ,          V9   d8   \         P                  RV^ ,          4       VP                  V^ ,          4       KS  VP                  V4       Kf  	  VRRR1,          # )zæRemove any entries that have a device name that doesn't exist.

If the second field of a mount line is None (not the string, the value),
we skip it along with any other entries that came before it that share
the same device name.
Nz$Skipping nonexistent device named %sr   )r?   r@   r«   )r²   ÚactlistÚdev_denylistr¥   s   &   r    Úremove_nonexistent_devicesrÉ   §  sw   € ð €GØ€LØ‘t˜�t—�ˆØ��7Š?˜d 1�g¨Ô5Ü�I‰IÐ<¸dÀ1½gÔFØ×Ñ  Q¥Ö(à�N‰N˜4Ö ñ ð ‘4�R�4�=Ðr"   c                óü   € V ^8„  d   QhR\         \         \        ,          ,          R\        R\        \        \        3,          R\        \        \        3,          R\        R\         \         \        ,          ,          /# )rK   r²   Údefault_mount_optionsrN   r³   rµ   rO   )r   r*   r   r
   )rQ   s   "r    rR   rR   º  sd   € ÷ !ñ !Ü””c•�Oð!äð!ô ”Sœ#�X•ð!ô œœc˜•Nð	!ô
 ð!ô 
Œ$Œs�)…_ñ!r"   c                ó¾  a	€ \         P                  ! V 4      pRRRVRR.. RO3 Fµ  o	S	^ ,          p\        WdP                  VR7      p\	        WgV4      '       g   K7  \        \        V4      S	^ &   \        ;QJ d    V	3R lV  4       F  '       g   K   RM	  R	M! V	3R lV  4       4      pV'       d   \        P                  R
V4       K¤  VP                  S	4       K·  	  V# )zwAdd default mounts to the user provided mount configuration.

Add them only if no other entry has the same device name
r>   z/mntr”   r†   Ú2r·   c              3   óH   <"  € T F  q^ ,          S^ ,          8H  x € K  	  R# 5i)é    N© )Ú.0ÚcfgmÚdefault_mounts   & €r    Ú	<genexpr>Ú,add_default_mounts_to_cfg.<locals>.<genexpr>Ô  s    øé € ð %
Ù4:¨D��G�} QÕ'Ö'³Fùs   ƒ"TFz-Not including %s, already previously included)r   Únoner   Úswr†   r†   )ÚcopyÚdeepcopyrI   rº   rT   r   r*   Úanyr?   r@   r«   )
r²   rË   rN   r³   rµ   Ú
new_mountsr¾   rM   Údefault_already_existsrÓ   s
   &&&&&    @r    Úadd_default_mounts_to_cfgrÝ   º  sÓ   ø€ ô —’˜vÓ&€Jà	�v˜vÐ'<¸cÀ3ÐGÚ0óˆð ˜aÕ ˆÜ$Ø×.Ñ.¸ô
ˆ	ô *¨%¸J×GÒGÙô  ¤ YÓ/ˆ�aÑç!$£ô %
Ù4:ó%
§§¢ô %
Ù4:ó%
ó "
Ð÷ "Ü�I‰IÐEÀuÔMÙØ×Ñ˜-Ö(ñ)ð* Ðr"   c                óˆ   € V ^8„  d   QhR\         \         \        ,          ,          R\         \         \        ,          ,          /# )rK   rÇ   rO   rÅ   )rQ   s   "r    rR   rR   Þ  s*   € ÷ ñ œœd¤3�i�ð ¬T´$´sµ)­_ñ r"   c                óŠ   € V  Uu. uF2  pVR,          V^,           R\          2.,           VR,          ,           NK4  	  up# u upi )z=Add "comment=cloudconfig" to the mount options of each entry.:Né   NÚ,:rŠ   NN)rª   )rÇ   Úentrys   & r    Úadd_commentrã   Þ  sP   € ñ óáˆEð 	ˆb�	˜˜a��z ¤; -Ð0Ð1Õ1°E¸"µI×=Ð=Ùñð ùò s   …8A c                óT   € V ^8„  d   QhR\         \         \        ,          ,          RR/# )rK   rÇ   rO   NrÅ   )rQ   s   "r    rR   rR   æ  s"   € ÷ $ñ $¤T¬$¬s­)¥_ð $¸ñ $r"   c                ó®   € \         ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      '       d   \        P                  ! RR.4       R# R# )z1Call 'swapon -a' if any entry has a swap fs type.c              3   ó8   "  € T F  q^,          R8H  x € K  	  R# 5i)rK   r   NrÐ   )rÑ   râ   s   & r    rÔ   Ú*activate_swap_if_needed.<locals>.<genexpr>è  s   é € Ð
3©7 %��8�vÖ«7ùs   ‚TFÚswaponú-aN)rÚ   r   )rÇ   s   &r    Úactivate_swap_if_neededrê   æ  s9   € ç
ƒsÑ
3©7Ó
3‡s‡s‚sÑ
3©7Ó
3×3Ò3Ü�	Š	�8˜TÐ"Ö#ñ 4r"   c                óV   € V ^8„  d   QhR\         R\         R\        \        ,          RR/# )rK   Úuses_systemdÚchanges_madeÚdirsrO   N)rP   r   r*   )rQ   s   "r    rR   rR   ì  s0   € ÷ 6ñ 6Üð6Ü&*ð6Ü26´sµ)ð6à	ñ6r"   c                ó|  € RpV'       d   RpMe\         P                  ! 4       P                  4        Uu0 uF  pRV9   g   K  VR,          kK  	  pp\        \	        V4      P                  V4      4      pV'       d=   \        P                  ! RR.4       V '       d   \        P                  ! RR.4       R# R# R# u upi )	zªCall 'mount -a' if needed.

If changes were made, always call 'mount -a'. Otherwise, call 'mount -a'
if any of the directories in the mount list are not already mounted.
FTÚ
mountpointÚmountré   Ú	systemctlzdaemon-reloadN)r	   r²   ÚvaluesrP   ÚsetÚ
differencer   )rì   rí   rî   Údo_mountÚvalÚmount_pointss   &&&   r    Úmount_if_neededrù   ì  s¥   € ð €HßØ‰ô —{’{“}×+Ñ+Ô-ó
á-�Ø˜sÑ"ô ˆC�×ÐÙ-ð 	ð 
ô
 œ˜D›	×,Ñ,¨\Ó:Ó;ˆçÜ�	Š	�7˜D�/Ô"ßÜ�IŠI�{ OÐ4Ö5ñ ñ ùò
s   ³	B9ÁB9c                ó>   € V ^8„  d   QhR\         \        ,          RR/# )rK   Úds_remove_entryrO   N)r   r*   )rQ   s   "r    rR   rR     s"   € ÷ Oñ O¤8¬C¥=ð O¸Dñ Or"   c                 ó  a€ \         P                  P                  \        4      '       g   R # \        .pV '       d   VP                  V 4       \        \        R4      ;_uu_ 4       pVP                  4       pR R R 4       . pRpX FX  o\        ;QJ d    V3R lV 4       F  '       d   K   RM	  RM! V3R lV 4       4      '       d   RpKG  VP                  S4       KZ  	   V'       dO   \        \        R4      ;_uu_ 4       pVP                  V4       R R R 4       \        P                  R\        4       R # R #   + '       g   i     LË; i  + '       g   i     LA; i  \         d"   p\        P                  RT4        R p?R # R p?ii ; i)NÚrFc              3   ó,   <"  € T F	  qS9   x € K  	  R # 5i©NrÐ   )rÑ   râ   r¥   s   & €r    rÔ   Ú cleanup_fstab.<locals>.<genexpr>  s   øé € Ð9©. ˜Ž}«.ùs   ƒTÚwz%Removed resource disk entries from %sz4Failed to clean resource disk entries from fstab: %s)r+   r,   r-   r©   rª   r«   ÚopenÚ	readlinesr   Ú
writelinesr?   rn   r¢   rŸ   )rû   Úremove_entriesÚfÚlinesÚ	new_linesÚchangedr   r¥   s   &      @r    Úcleanup_fstabr
    s  ø€ Ü�7‰7�>‰>œ*×%Ò%Ùä!�]€NßØ×Ñ˜oÔ.ä	Œj˜#×	Ô	 !Ø—‘“ˆ÷ 
à€IØ€GÛˆß‹3Ô9©.Ó9�3�3Š3Ô9©.Ó9×9Ò9ØˆGÙØ×Ñ˜Öñ	 ðOßÜ”j #×&Ô&¨!Ø—‘˜YÔ'÷ 'ä�H‰HÐ<¼jÖIñ ÷ 
×	ú÷ '×&ûô ô OÜ�‰ÐJÈA×NÒNûðOúsB   Á%D9Ã!E Ã)E ÄEÄ"E Ä9E		ÅE	ÅE ÅFÅ*FÆFc          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )rK   r   Úcfgrµ   ÚargsrO   N)r*   r   r
   r¹   )rQ   s   "r    rR   rR   !  s6   € ÷ P4ñ P4”ð P4œ6ð P4¬%ð P4´tð P4Àñ P4r"   c           
     ój  € VP                   P                  4       pV'       d   RMRpRRRVRR.pVP                  RV4      pVP                  R. 4      p\        P	                  R	V4       \        4       w  ršpVP                  R
/ 4      p\        WŠWÇV4      p\        WÕW¬V4      p\        V4      p\        V4      p\        VP                  R/ 4      4      pV'       d   VP                  VRRRRR.4       V'       g   \        P	                  R4       R# V Uu. uFU  pRP                  \        P                  ! V^ ,          4      \        P                  ! V^,          4      .VR,          O4      NKW  	  ppV Uu. uF,  pV^,          P                  R4      '       g   K#  V^,          NK.  	  ppV F  p \        P                   ! V4       K  	  V Uu. uF  pVP'                  RR4      NK  	  ppV Uu. uF  pVP'                  RR4      NK  	  ppV Uu. uF  pVV9  g   K  RV 2NK  	  upV Uu. uF  pVV9  g   K  RV 2NK  	  up,           pV	P)                  V4       RRP                  V	4      ,          p\        P*                  ! \,        V4       V'       d   \        P	                  RV4       M\        P	                  R4       \/        V4       \1        V\3        V4      V4       R# u upi u upi   \"         d"    \        P$                  ! \        RT4        EKq  i ; iu upi u upi u upi u upi )z Handle the mounts configuration.zBdefaults,nofail,x-systemd.after=cloud-init-network.service,_netdevzdefaults,nobootwaitNr”   r†   rÍ   Úmount_default_fieldsr²   zmounts configuration is %sr³   r   rÖ   r×   z No modifications to fstab neededÚ	:rK   NNr5   z Failed to make '%s' config-mountr�   z- z+ z%s
Ú
zChanges to fstab: %szNo changes to /etc/fstab made.)Údistrorì   rB   r?   r@   r°   rÃ   rÝ   rÉ   rã   r¦   r«   r8   r	   Úescape_fstab_fieldr   r�   r¢   ÚlogexcÚreplaceÚextendÚ
write_filer©   rê   rù   rP   )r   r  rµ   r  rì   rË   Úhardcoded_defaultsr´   r²   r­   rN   r®   r³   Úupdated_cfgÚswapfilerâ   Ú	cfg_linesÚdrî   ÚnÚsaddsÚsdropsÚdropÚaddÚsopsÚcontentss   &&&&                      r    Úhandler$  !  sü  € ð —<‘<×,Ñ,Ó.€L÷ ñ 	Mà"ð ð   fÐ.CÀSÈ#ÐNÐØ*-¯'©'ØÐ 2ó+€Nð 36·'±'¸(ÀBÓ2G€Fä‡I�IÐ*¨FÔ3ä-8«]Ñ*€K˜]Ø—W‘WÐ-¨rÓ2€Nä/Ø˜N¸Eó€Kô ,Ø¨JÈó€Kô -¨[Ó9€KÜ˜kÓ*€Kä˜cŸg™g f¨bÓ1Ó2€HßØ×Ñ˜H f¨f°d¸CÀÐEÔFçô
 	�	‰	Ð4Ô5Ùñ !ó	ñ !ˆEð 	�	‰	ä×'Ò'¨¨a­Ó1Ü×'Ò'¨¨a­Ó1ðð �r•ðö	
ñ !ð ð 	ñ &Ó>™+�Q¨¨1­¯©¸×)=ŒDˆAˆa�DˆD™+€DÐ>ãˆð	DÜ�OŠO˜AÖñ ñ ,5Ó5©9 aˆQ�Y‰Y�t˜SÖ!©9€EÐ5Ù,9Ó:©M qˆa�i‰i˜˜cÖ"©M€FÐ:á$*Ó@¡F˜D¨d¸%Ñ.?ŒKˆb��‹K¡FÑ@Ù#óDÙ#�s s°&Ñ'8Œ
ˆ"ˆSˆE‹
™eñDõ €Dð ×Ñ�yÔ!Ø˜Ÿ	™	 +Ó.Õ.€HÜ‡O‚O”J Ô)çÜ�	‰	Ð(¨$Õ/ä�	‰	Ð2Ô3ä˜KÔ(Ü�L¤$ t£*¨dÖ3ùòI	ùò ?øô
 ô 	DÜ�KŠKœÐ?À×CÐCð	Düò 6ùÚ:ùâ@ùò DsI   ÄAK(Å6 K-ÆK-Æ0K2ÇL!Ç/L&È	L+È	L+È-	L0È;	L0Ë2'LÌLc                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )rK   Úmeta)Ú__conditional_annotations__r   )rQ   s   "r    rR   rR   	   s   € × 3Ñ 3÷ ò „jñ ò! 4r"   r•   i   @rÿ   )NNN)NN)7r'  Ú__doc__rØ   Úloggingre   r+   r$   Útypingr   r   r   r   r   Ú	cloudinitr   r   r	   Úcloudinit.cloudr
   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.settingsr   r&  rC   r&   r©   rª   ri   rc   Ú	getLoggerÚ__name__r?   r!   r'   r3   r<   rI   rT   rs   r’   rš   r¦   r°   rÃ   rÉ   rÝ   rã   rê   rù   r
  r$  rR   )r'  s   @r    Ú<module>r2     sñ   øðö 4ó Û Û Û 	Û 	ß 4Õ 4ç -Ñ -Ý !Ý #Ý .Ý +ð 	ˆ+Ø�ˆwØ�Ø˜rð	€ó ð ?Ð àÐ Ø€
Ø#€Ø
€Ø
€à×Ò˜Ó!€ò	òò
ô$ô.õbô&6õr;ô|ò<-õ`2õ4+õ\õ&!õHõ$õ6÷2O÷8P4r"   