Убрал старую логику ntp #28

pull/30/head
Igor Belitskiy 3 years ago
parent d2133e6a61
commit b42f18f894

@ -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");

Loading…
Cancel
Save