diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc
index f4eecf6..87ca41d 100644
--- a/source/ubl-settings-datetime.cc
+++ b/source/ubl-settings-datetime.cc
@@ -122,6 +122,7 @@ int MainWindow::check_root(){
}
void MainWindow::lacalization(){
txtDate->set_tooltip_text(_("Date of\nFormat: DD.MM.YYYY"));
+ txtNtpServer->set_tooltip_text(_("Enter the name of the ntp server or its ip address.\nWhen entering multiple addresses, separate them with spaces."));
lblSynchronizebChkGLob->set_text(_("Synchronize via NTP"));
cbDhcp->append(_("By default"));
cbDhcp->append(_("DHCP"));
@@ -290,15 +291,21 @@ void MainWindow::wind_close_ntp(){
void MainWindow::stop_ntp(){
windowsNnpClose->hide();
- string cmd = "SEL_SERVICE=\"systemd-timesyncd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service; "
- "SEL_SERVICE=\"ntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "
- "SEL_SERVICE=\"ntpdate\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "
- "SEL_SERVICE=\"chronyd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "
- "SEL_SERVICE=\"openntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ntpd; "
- "SEL_SERVICE=\"ptp4l\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "
- "SEL_SERVICE=\"phc2sys\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE} ";
-
+ string cmd = "SEL_SERVICE=\"systemd-timesyncd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service; ";
+ system(cmd.c_str());
+ cmd ="SEL_SERVICE=\"ntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
+ system(cmd.c_str());
+ cmd ="SEL_SERVICE=\"ntpdate\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
+ system(cmd.c_str());
+ cmd = "SEL_SERVICE=\"chronyd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
+ system(cmd.c_str());
+ cmd ="SEL_SERVICE=\"openntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ntpd; ";
system(cmd.c_str());
+ cmd ="SEL_SERVICE=\"ptp4l\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
+ system(cmd.c_str());
+ cmd ="SEL_SERVICE=\"phc2sys\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE} ";
+ system(cmd.c_str());
+
this->update_time_date();
}
@@ -463,8 +470,6 @@ void MainWindow::get_config(){
this->update_hour_minute();
this->update_calendar();
this->enry_dhcp_mess();
-
-
string read_reg_zon_cfg = this->call("/usr/bin/ubconfig get clock ZONE");
if ((read_reg_zon_cfg != "") && (strstr(read_reg_zon_cfg.c_str() ,"(null)")==NULL)){
read_reg_zon_cfg = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("=")+1,read_reg_zon_cfg.length());
@@ -688,7 +693,6 @@ void MainWindow::update_time_date(){
cmd = "date +%Y%m%d -s \"" + to_string(year)+
str_month+str_day+"\"";
system(cmd.c_str());
-
txtDate->set_text(str_data);
year=0;
month=0;
@@ -794,7 +798,6 @@ void MainWindow::read_file(){
}
in1.close();
}
-
time_reg_map.insert({key_reg, zone});
time_reg_map_local.insert({key_reg, zone_local});
}}}}
@@ -805,7 +808,6 @@ void MainWindow::read_file(){
}
string MainWindow::zone_file_read(string zone){
-
if (zone.length()==1){
return "";
}
diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade
index 828918b..0c04dfe 100644
--- a/ubl-settings-datetime.glade
+++ b/ubl-settings-datetime.glade
@@ -807,6 +807,7 @@ Format: DD.MM.YYYY
-1
True
True
+ Enter the name of the ntp server or its ip address. When entering multiple addresses, separate them with spaces.
center
5
5
diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po
index 4a9826f..5b04ae9 100644
--- a/ubl-settings-datetime_ru.po
+++ b/ubl-settings-datetime_ru.po
@@ -1593,3 +1593,6 @@ msgstr "Майотта"
msgid "BajaSur"
msgstr "Южная Нижняя Калифорния"
+msgid "Enter the name of the ntp server or its ip address.\nWhen entering multiple addresses, separate them with spaces."
+msgstr "Введите имя ntp-сервера или его ip-адрес.\nПри вводе нескольких адресов, разделяйте их пробелами."
+