From b42f18f8949a6f3d8aa406ca1476b3efe95fb377 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Fri, 3 Feb 2023 10:30:12 +0600 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D1=83=D1=8E=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D1=83?= =?UTF-8?q?=20ntp=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index b2ccfac..da958d4 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -281,22 +281,6 @@ void MainWindow::stop_ntp(){ } - -void MainWindow::set_ntp_toggle(){ - bool flag = cbxSynchronizeNtpGlob->get_active(); - - string cmd = ""; - if (flag==false){ - cmd="systemctl --now disable systemd-timesyncd.service ntpd.service"; - system(cmd.c_str()); - } - else { - cmd = "systemctl --now enable systemd-timesyncd.service"; - system(cmd.c_str()); - } -} - - void MainWindow::hardware_clock(){ string cmd = "hwclock --systohc"; system(cmd.c_str()); @@ -436,7 +420,6 @@ void MainWindow::get_config(){ this->update_hour_minute(); this->update_calendar(); this->enry_dhcp_mess(); - //string str_ntp = this->call("systemctl status ntpd.service systemd-timesyncd.service | grep \"Active: active\""); string read_reg_zon_cfg = this->call("/usr/bin/ubconfig get clock ZONE"); @@ -495,7 +478,6 @@ void MainWindow::enter_zone_glob(){ } void MainWindow::set_ntp_toggle_glob(){ - this->set_ntp_toggle(); bool flag = cbxSynchronizeNtpGlob->get_active(); if (flag==false){ system("/usr/bin/ubconfig remove network NTPSERVERS");