initial ntp feature

This one has been partially implemented for regular builds
but making it generally available seems much better.
This commit is contained in:
Michael Shigorin 2015-10-02 15:51:00 +03:00
parent 514ee63baa
commit df45ac1bca
3 changed files with 22 additions and 0 deletions

4
features.in/ntp/README Normal file
View File

@ -0,0 +1,4 @@
Эта фича конфигурирует службу NTP в качестве клиента
с целью предоставления точного времени в составе LiveCD;
для установленных систем рекомендуется применение модуля
alterator-datetime.

View File

@ -0,0 +1,8 @@
use/ntp: use/services
@$(call add_feature)
@$(call add,THE_PACKAGES,openntpd)
@$(call add,DEFAULT_SERVICES_ENABLE,ntpd)
use/ntp/client: use/ntp
@$(call add,NTP_SERVERS,pool.ntp.org)
@$(call xport,NTP_SERVERS)

View File

@ -0,0 +1,10 @@
#!/bin/sh
# basic NTP client configuration
. shell-config
CONFIG="/etc/ntpd.conf"
[ -f "$CONFIG" ] || exit 0
[ -n "$GLOBAL_NTP_SERVERS" ] || exit 0
shell_config_set "$CONFIG" 'servers' "$GLOBAL_NTP_SERVERS" '[[:space:]]\+' ' '