403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/config/__pycache__/cc_growpart.cpython-314.pyc
+
��iyI��Pa�R8t>0tRt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
HtHt^RI
Ht^RIHt^RIHtHt^RIHtHtHtHtHt^RIHt^RIHt^R	IHt^R
I H!t!H"t"^RI#H$t$]$t%RR
R]!.R]%R./t&]^kRRRR.RR/t']!R4t(!RR4t)]PT!]+4t,!RR]-4t.!RR]4t/!RR]/4t0!R R!]/4t1!R"R#]/4t2R$R%lt3R&R'lt4R(R)lt5R*t6R+R,lt7R-t8R.R/lt9R0t:R1R2lt;R3R4lt<R5]03R6]13R7]233t=R#)9zGrowpart: Grow partitionsN)�ABC�abstractmethod)�suppress)�Path)�Optional�Tuple)�	lifecycle�performance�subp�
temp_utils�util)�Cloud)�Config)�
MetaSchema)�ALL_DISTROS�Distro)�
PER_ALWAYS�id�cc_growpart�distros�	frequency�activate_by_schema_keys�mode�auto�devices�/�ignore_growroot_disabledFz/cc_growpart_keydatac�&�]tRt^/tRtRtRtRtRtR#)�RESIZE�SKIPPED�CHANGED�NOCHANGE�FAILED�N)	�__name__�
__module__�__qualname__�__firstlineno__rr r!r"�__static_attributes__r#��>/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.pyrr/s���G��G��H�
�Fr)rc��]tRt^9tRtR#)�ResizeFailedExceptionr#N)r$r%r&r'r(r#r)r*r,r,9s��r)r,c�^a�]tRt^=toV3RlRlt]V3RlRl4t]R4tRtVt	R#)�Resizerc� <�V^8�dQhRS[/#)��distro)r)�format�
__classdict__s"�r*�__annotate__�Resizer.__annotate__>s�����v�r)c��WnR#�N��_distro)�selfr1s&&r*�__init__�Resizer.__init__>s���r)c�&<�V^8�dQhRS[RS[/#)r0r�return)�list�bool)r2r3s"�r*r4r5Bs���3�3��3�$�3r)c��R#r7r#�r:rs&&r*�	available�Resizer.availableAs��03r)c��R#r7r#)r:�diskdev�partnum�partdev�fss&&&&&r*�resize�Resizer.resizeDs��58r)r8N)
r$r%r&r'r;rrCrJr(�__classdictcell__�r3s@r*r.r.=s-�������3��3��8��8r)r.c�8a�]tRt^HtoV3RlRltRtRtVtR#)�ResizeGrowPartc� <�V^8�dQhRS[/#�r0r�r?)r2r3s"�r*r4�ResizeGrowPart.__annotate__I����
�
��
r)c���\P!RR.RR/R7Pp\P!RV4'dR#R# \PdR#i;i)�growpartz--help�LANG�C��
update_envz--update\s+TF)r
�stdout�re�search�ProcessExecutionError)r:r�outs&& r*rC�ResizeGrowPart.availableIsh��	��)�)��X�&�F�C�=���f�
��y�y���-�-��.�
���)�)�	���	�s�AA
�
A#�"A#c	�n�\W44pVPP4p\P!VRR7;_uu_4p\
PPVR4pRRRV/p	\
PPV4'g\
P!VR4\P!RRW.V	R7\P!RY.T	R7R
R
R
4T\Y443# \PdRp
T
P^8wd*\P!\R	TT4\!T
4T
hYU3uR
p
?
uuR
R
R
4#R
p
?
ii;i \Pd.p
\P!\RY4\!T
4T
hR
p
?
ii;i +'giL�;i)T)�dir�	needs_exerVrWrX�TMPDIRi�z	--dry-runrYz&Failed growpart --dry-run for (%s, %s)NzFailed: growpart %s %s)�get_sizer9�get_tmp_exec_pathr�tempdir�os�path�join�exists�mkdirr
r^�	exit_coder�logexc�LOGr,)r:rFrGrHrI�before�tmp_dir�tmpd�growpart_tmp�my_env�es&&&&&      r*rJ�ResizeGrowPart.resizeUs_���'�&���,�,�0�0�2��
�
�
�G�t�
<�
<���7�7�<�<��j�9�L��c�8�\�:�F��7�7�>�>�,�/�/�����u�-�
(��	�	���g�?�%��
6��	�	�:�w�8�V�L�-=�6���-�.�.��#�-�-�	
(��;�;�!�#��K�K��@���	�0��2��9��'�'�'=�
<��	
(���-�-�
6����C�!9�7�L�+�A�.�A�5��
6��/=�
<�sU�A#F$�*C6�E�6E�<E�E�F$�E�F$�F!�4(F�F!�!F$�$F4	r#N�r$r%r&r'rCrJr(rLrMs@r*rOrOHs����
�
�!/�!/r)rOc�<a�]tRt^ytoRtV3RlRltRtRtVtR#)�ResizeGrowFSa�
Use FreeBSD ``growfs`` service to grow root partition to fill available
space, optionally adding a swap partition at the end.

Note that the service file warns us that it uses ``awk(1)``, and as
such requires ``/usr`` to be present. However, cloud-init is installed
into ``/usr/local``, so we should be fine.

We invoke the ``growfs`` with ``service growfs onestart``, so it
doesn't need to be enabled in ``rc.conf``.
c� <�V^8�dQhRS[/#rQrR)r2r3s"�r*r4�ResizeGrowFS.__annotate__�s���G�G��Gr)c�\�\PPR4;'dVR.8H#)z'growfs only works on the root partitionz/etc/rc.d/growfsr)rhri�isfilerBs&&r*rC�ResizeGrowFS.available�s%���w�w�~�~�0�1�F�F�g�#��6F�Fr)c��\W44pVPPRRR7T\Y443# \Pd-p\
P!\R4\T4ThRp?ii;i)�onestart�growfs)�action�servicezFailed: service growfs onestartN)	rer9�manage_servicer
r^rrnror,)r:rFrGrHrIrprus&&&&&  r*rJ�ResizeGrowFS.resize�sn���'�&��	2��L�L�'�'�z�8�'�L�
���-�.�.��	�)�)�	2��K�K��>�?�'��*��1��	2�s�7�A8�'A3�3A8r#N)	r$r%r&r'�__doc__rCrJr(rLrMs@r*ryryys ����
�G�G�/�/r)ryc�8a�]tRt^�toV3RlRltRtRtVtR#)�ResizeGpartc� <�V^8�dQhRS[/#rQrR)r2r3s"�r*r4�ResizeGpart.__annotate__�rTr)c���\P!RR.RR/^^.R7Pp\P!RV4'dR#R# \PdR#i;i)�gpart�helprWrX)rZ�rcszgpart recover TF)r
�stderrr\r]r^)r:r�errs&& r*rC�ResizeGpart.available�so��	��)�)��&�!�v�s�m�!�Q����f�
��y�y�*�C�0�0��1�
���)�)�	���	�s�AA
�
A&�%A&c���\P!RRV.4\W44p\P!RRRW!.4T\Y443# \PdDpTP^8wd)\P!\
RT4\
T4ThRp?L�Rp?ii;i \Pd.p\P!\
RY!4\
T4ThRp?ii;i)a	
GPT disks store metadata at the beginning (primary) and at the
end (secondary) of the disk. When launching an image with a
larger disk compared to the original image, the secondary copy
is lost. Thus, the metadata will be marked CORRUPT, and need to
be recovered.
r��recoverzFailed: gpart recover %sNrJz-izFailed: gpart resize -i %s %s)r
r^rmrrnror,re)r:rFrGrHrIrurps&&&&&  r*rJ�ResizeGpart.resize�s���	6��I�I�w�	�7�3�4��'�&��	2��I�I�w��$��A�B�
���-�.�.���)�)�	6��{�{�a�����C�!;�W�E�+�A�.�A�5� ��	6���)�)�	2��K�K��<�g�O�'��*��1��	2�s.�A�B)�B&�#9B!�!B&�)C+�>(C&�&C+r#NrwrMs@r*r�r��s����
�
�/�/r)r�c�H�V^8�dQhR\R\R\R\/#)r0rr1rr>)�strrr?r.)r2s"r*r4r4�s(����#��v�����r)c��RpVR8XdJ\F)wrEV!V4pVPVR7'gK'TpM	V'g\R4hV#/p\F	wr�W�V&K	W9d\RV,4hWp,!V4p
V
PVR7'dT
pV'g\RV,4hV#)Nr)rzNo resizers availablezunknown resize mode %szmode %s not available)�RESIZERSrC�
ValueError�	TypeError)rr1r�resize_class�_name�resizer�cur�mmap�k�v�mclasss&&&        r*�resizer_factoryr��s����L��v�~�&�N�E��&�/�C��}�}�W�}�-�-�"���	'���4�5�5��$�����D�A���G�����4�t�;�<�<���F�#�����G��,�,�!�L���4�t�;�<�<��r)c�:�V^8�dQhR\\,/#�r0r>�r�int)r2s"r*r4r4�s����h�s�m�r)c���Rp\P!V\P4p\P!V^\P4V'd\P
!V4## \dXTR8Xd-\T4uT'd\P
!T4##T'd\P
!T4R#R#i;i T'd\P
!T4ii;i)N�zfs)rh�open�O_RDONLY�lseek�SEEK_END�close�FileNotFoundError�get_zfs_size)�filenamerI�fds&& r*rere�s���	
�B�	�
�W�W�X�r�{�{�
+���x�x��A�r�{�{�+���H�H�R�L�����
��;���)�)���H�H�R�L���
��H�H�R�L����
��H�H�R�L��s*�A
A.�.C�C�,C�C�C�!C4c�:�V^8�dQhR\\,/#r�r�)r2s"r*r4r4�s����X�c�]�r)c��VPR4^,p\P!RRRRV.4wr#\TP
44# \Pd"p\P	RY4Rp?R#Rp?ii;i)r�zpool�getz	-Hpovalue�sizezFailed: zpool get size %s: %sN)�splitr
r^ro�debugr��strip)�datasetr�r��_rus&    r*r�r��sr���M�M�#��q�!�E���)�)�W�e�[�&�%�H�I����t�z�z�|�����%�%���	�	�1�5�<����s�A�B�%B�Bc��VPR4'dVR3#\P!V4pV'g\R4hV^,pV^,p\P!4pVR8XdjV'gb\P
!\P!44pVf5\PPV4'dVR3#\R4hW#3#)�/dev/Nz,Could not determine device of '%s' % dev_entz	/dev/rootz!Unable to find device '/dev/root')
�
startswithr�get_mount_infor��is_container�rootdev_from_cmdline�get_cmdlinerhrirk)�devent�result�devrI�	containers&    r*�
devent2devr��s���
����!�!��t�|��
�
 �
 ��
(�F���G�H�H�
��)�C�	���B��!�!�#�I��k��)��'�'��(8�(8�(:�;���;��w�w�~�~�c�"�"��D�y� ��@�A�A��7�Nr)c�$�V^8�dQhR\/#r�)r@)r2s"r*r4r4	s�����r)c�R�\P!R4'g\PR4R#\P!RRV.4\\P4;_uu_4\P!RRT.4\PR	T4RRR4R
# \PdTpTP
^8Xd\PRT4M \P
RTP
4Rp?R#Rp?ii;i +'giR#;i)z�
Check if a device is an encrypted device. blockdev should have
a /dev/dm-* path whereas partition is something like /dev/sda1.
�
cryptsetupz6cryptsetup not found. Assuming no encrypted partitionsF�statusz#Determined that %s is not encryptedzZReceived unexpected exit code %s from cryptsetup status. Assuming no encrypted partitions.N�isLukszDetermined that %s is encryptedT)r
�whichror�r^rm�warningr)�blockdev�	partitionrus&& r*�is_encryptedr�	s���
�:�:�l�#�#��	�	�J�K����	�	�<��8�4�5�
�$�,�,�	-�	-��	�	�<��9�5�6��	�	�3�X�>��
.�	-���%�%�	��;�;�!���I�I�;�X�F��K�K�G����
�
��	��
.�	-��s$�B*�/1D�*D�?AD
�
D�D&	c�B�RRRV.p\P!V4^,pVPR4'g\RV24hRVPR4^,PR4^,2# \dp\RTR	TR
24ThRp?ii;i)�dmsetup�depsz--options=devnamez1 dependz5Expecting '1 dependencies' from 'dmsetup'. Received: r�z: (�)zRan `z$`, but received unexpected stdout: `�`N)r
r��RuntimeErrorr��
IndexError)r��command�deprus&   r*�get_underlying_partitionr�$s����&�"5�x�@�G��y�y��!�!�$�C��>�>�*�%�%��C�C�5�I�
�	
���s�y�y��'��*�0�0��5�a�8�9�:�:������G�9�@���Q�G�
��	���s�
0A;�;B�B�Bc�F�V^8�dQhR\\\3,/#r�)rr�)r2s"r*r4r45s��6�6�U�3��8�_�6r)c���\P4'g\PR3#\P
!R\24;_uu_4\P
4;_uu_4p\P!V4pRRR4RRR4XR,p\P!V4pVR,p\P!RRR	R
T.TR7\P!RRR
T\T4.4\P%4\P*RTR23# +'giL�;i +'giL�;i \dp\R4ThRp?ii;i \Pd!p\ P#RT4Rp?L�Rp?ii;i \d\&P(!\ R4L�i;i \P!RRR
T\T4.4M8 \Pd!p\ P#RT4Rp?MRp?ii;i\P%4i \d\&P(!\ R4ii;i;i)z�Use 'cryptsetup resize' to resize LUKS volume.

The loaded keyfile is json formatted with 'key' and 'slot' keys.
key is base64 encoded. Example:
{"key":"XFmCwX2FHIQp0LBWaLEMiHIyfxt1SGm16VvUAVledlY=","slot":5}
zNo encryption keyfile foundzReading N�key�slotzZCould not load encryption key. This is expected if the volume has been previously resized.r�z
--key-file�-rJ)�data�luksKillSlotz--batch-modez<Failed to kill luks slot after resizing encrypted volume: %sz8Failed to remove keyfile after resizing encrypted volumez'Successfully resized encrypted volume '�')�KEYDATA_PATHrkrrr	�Timedr��json�load�base64�	b64decode�	Exceptionr�r
r�r^ror��unlinkrrnr )r�r��f�keydatar��decoded_keyr�rus&&      r*�resize_encryptedr�5s#����� � ���� =�>�>��
�
�
��|�n�%�
�
������!��i�i��l�G��
��e�n���&�&�s�+���v�����	�	�
�<��h��A��	
�
	��I�I� �"�"����I��
�	����!�	���
1�(��1�=���O���
�
�����
6�
��	����,�)�)�	��K�K�N��
�
��	���	��K�K��O�
�	��#	��I�I� �"�"����I��
���)�)�	��K�K�N��
�
��	��
	����!���	��K�K��O�
�	�s��%E�E�0D-	�E�0E�G�$E2�F*�-D=
�8E�E	�E�E/�E*�*E/�2F'�F"�"F'�*&G�G�I7�$G=�<I7�=H2�H-�(I7�-H2�2I7�6I�
I7�&I4�1I7�3I4�4I7c�Z�.pVPW#WE4wrxWx8Xd.VPV\PRV:RV:R234V#VeVfDRp	VeVf
RV:RV:R2p	M	RV,p	VPV\PV	34V#Rp	VeVfRV:RV:RV:R	V:2p	MRV:RV:R	V:2p	VPV\PV	34V# \
d:p
TPT\PR
T:RT:RT
:234Rp
?
T#Rp
?
ii;i)
zno change necessary (z, r�N�z	changed (z) size, new size is unknownz&changed (%s) size, new size is unknownz) from z to zfailed to resize: disk=z, ptnum=z: )rJ�appendrr!r r,r")r�r��disk�ptnumr�rI�info�old�new�msgrus&&&&&&     r*�
_call_resizerr�ns3��
�D�(
��>�>�$�x�<����:��K�K���O�O�6:�E�B��
�L�K�?�[�C�K��C���E�M�����
?��I���K�K������5�6�,�K�)�C���E�M�����	���7?��S�I���K�K������5�6��K��!�
������
�
�=A�5�!�L�
�	
�	
��K��
�s&�AC&�A	C&�A
C&�&D*�1.D%�%D*c�0�V^8�dQhR\R\/#)r0r�r1)r.r)r2s"r*r4r4�s��q�q�G�q�f�qr)c	�J�\P!V4p.pV'Ed�VP^4pRpRp\V4wrx\PRT4TR8Xd-\T\4'dT\YYVYx4,
pKu\P!T4p
\P!T
P 4'gS\P"!T
P 4'g-TP	T\
PRT,34EKTP%T4pT'd�\'T4p\)Y�4'dfY�U
u.uFq�^,NK
	up
9d(TP+^T4TP+^T4EK}\-Y|4wr�TP	TTT34M'TP	T\
PRTR	234EK�TP3T4wrVT\YYVYx4,
pEK�V# \d6p	TP	T\
PRT	,34Rp	?	EK1Rp	?	ii;i \d7p	TP	T\
PRT:RT	:234Rp	?	EKuRp	?	ii;iuup
i \.d3p	TP	T\
P0R
TRT	234Rp	?	L�Rp	?	ii;i \4\3d7p	TP	T\
PRT:RT	:234Rp	?	EKRp	?	ii;i)
�Nzunable to convert to device: %szgrowpart found fs=%sr�z	stat of 'z
' failed: zdevice '%s' not a block devicezResizing mapped device (z!) skipped as it is not encrypted.zResizing encrypted device (z
) failed: zdevice_part_info()�copy�popr�r�r�rrror��
isinstanceryr�rh�stat�OSError�S_ISBLK�st_mode�S_ISCHR�get_mapped_devicer�r��insertr�r�r"�device_part_infor�)r�rr1r�r�r�r�r�rIru�statret�underlying_blockdevr��xr��messages&&&             r*�resize_devicesr
�s����i�i�� �G�
�D�
�'����Q�������
	�%�f�-�L�H�	�	�	�(�"�-���;�:�g�|�<�<��M�'�4��M�M�D��
	��g�g�h�'�G��|�|�G�O�O�,�,�T�\�\��O�O�6
�6
�
�K�K���N�N�4�x�?��
�
�$�6�6�x�@���%
�4�X�>�	�� 3�?�?� �t�(<�t�!�1���t�(<�<� ���q�&�1����q�)�4� �&6�x�&K�O�F��K�K�"�"�#����K�K�"�"�N�N�6�x�j�A6�6���$
�
	� �1�1�(�;�K�D�	
�
�g�t�H�I�I���K��K�	��K�K���N�N�5��9��
�
��	��,�	��K�K���N�N�19�1�=��
�
��	��8)=��4�
������
�
�5�h�Z�z�!��M�����
���:�&�	��K�K���N�N�9A�1�E��
�
��	�s}�
H�I�7 J�J�(+J�!J�8&J�#K�I�)I
�
I�J�*J�J�J�K�&(K�K�L"�,*L�L"c
�L�V^8�dQhR\R\R\R\RR/#)r0�name�cfg�cloud�argsr>N)r�rr
r?)r2s"r*r4r4s/��09�09��09�6�09�%�09�t�09��09r)c��RV9d$\PR\4\VR&VPR4p\	V\
4'g\P
R4R#VPRR4p\P!V4'd=VR8wd\P!RVR2R	R
R7\PRV4R#\P!VPR
R44'dR\PPR4'd-\PR4\PR4R#\P!VRR.4p\V4'g\PR4R#\!WRP"VR7p\(P*!R4;_uu_4\-YvTP"4p	RRR4X	FJwr�pT\.P08Xd\P3RY�4K3\PRY�T4KL	R# \$\&3d+p\PRYX4TR8wdThRp?R#Rp?ii;i +'giL�;i)rVz.No 'growpart' entry in cfg.  Using default: %sz#'growpart' in config was not a dictNrr�offz"Growpart's 'mode' key with value 'r�z22.2zUse 'off' instead.)�
deprecated�deprecated_version�
extra_messagezgrowpart disabled: mode=%srFz/etc/growroot-disabledz0growpart disabled: /etc/growroot-disabled existsz&use ignore_growroot_disabled to ignorerrzgrowpart: empty device list)r1rz,growpart unable to find resizer for '%s': %szResizing devicesz'%s' resized: %sz'%s' %s: %s)ror��DEFAULT_CONFIGr�r�dictr�r�is_falser�	deprecaterhrir}�get_cfg_option_list�lenr�r1r�r�r	r�r
rr r�)
rrrr�mycfgrrr�ru�resized�entryr�r�s
&&&&         r*�handler!s�������	�	�<�n�	
�)��J���G�G�J��E��e�T�"�"����9�:���9�9�V�V�$�D��}�}�T����5�=����?��v�Q�G�#)�2�
�
	�	�	�.��5���}�}�U�Y�Y�9�5�A�B�B�
�7�7�>�>�2�3�3��I�I�H�I��I�I�>�?���&�&�u�i�#��?�G��w�<�<��	�	�/�0���!�$�|�|�W�M��
�	�	�-�	.�	.� ��5�<�<�@��
/�%���s��V�^�^�#��H�H�'��4��I�I�m�U�C�8�	&��
�	�"���	�	�@�$�J��6�>��G���	��
/�	.�s$�H8�I6�8I3�	I.�.I3�6J	rVr�r�c�@�V^8�dQh/^\9d
\;R&#)r0�meta)�__conditional_annotations__r)r2s"r*r4r4s����.��j��/ r))?r$r�r�r�r��loggingrh�os.pathr\r�abcrr�
contextlibr�pathlibr�typingrr�	cloudinitrr	r
rr�cloudinit.cloudr
�cloudinit.configr�cloudinit.config.schemar�cloudinit.distrosrr�cloudinit.settingsrrr#rr�r�	getLoggerr$ror�r,r.rOryr�r�rer�r�r�r�r�r�r
r!r�r4)r$s@r*�<module>r2sD��� �
����	��	��#���"�D�D�!�#�.�1�)��	��-�
��}����r�	����F�
��u������*�+��������!��	�I�	�9�c�9�./�W�./�b/�7�/�8#/�'�#/�L�<���0�6�"6�r+�\q�h09�h�� �
�|���k���r)

Youez - 2016 - github.com/yon3zu
LinuXploit