fix: manage_ntp_configuration not effective (#14426)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2022-06-11 19:16:45 +08:00
committed by GitHub
co-authored by Qiu Jian
parent 5b81fa4367
commit 58a53d9df5
+6 -3
View File
@@ -491,9 +491,12 @@ func (h *SHostInfo) checkSystemServices() error {
srvinst.Start(false)
}
}
for _, srv := range []string{"ntpd"} {
srvinst := system_service.GetService(srv)
funcEn(srv, srvinst)
if options.HostOptions.ManageNtpConfiguration {
for _, srv := range []string{"ntpd"} {
srvinst := system_service.GetService(srv)
funcEn(srv, srvinst)
}
}
svcs := os.Getenv("HOST_SYSTEM_SERVICES_OFF")