33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
|
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
|
|||
|
|
|