kiran-cc-daemon/0001-feature-timedate-Prior-to-select-last-ntp-service-in.patch
tangjie02 e768d9a414 Prior to select last ntp service in ntp-utils.d directory
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
2023-04-27 14:06:10 +08:00

33 lines
1.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From f399f85e9dcdd2786dec68f0f8bdd73b1547b891 Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Thu, 27 Apr 2023 08:57:46 +0800
Subject: [PATCH] feature(timedate): Prior to select last ntp service in
ntp-utils.d directory.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 改为优先选择最后一个ntp服务器即按照.d目录中最后一个文件作为最高优先级
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
plugins/timedate/timedate-manager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/timedate/timedate-manager.cpp b/plugins/timedate/timedate-manager.cpp
index 92a4147..bd3085e 100644
--- a/plugins/timedate/timedate-manager.cpp
+++ b/plugins/timedate/timedate-manager.cpp
@@ -404,7 +404,7 @@ void TimedateManager::init_ntp_units()
this->ntp_unit_name_.clear();
for (auto &ntp_unit : ntp_units)
{
- if (ntp_unit == ntp_units.front())
+ if (ntp_unit == ntp_units.back())
{
this->ntp_unit_name_ = ntp_unit;
continue;
--
2.36.1