forked from altcloud/mkimage-profiles
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:
parent
514ee63baa
commit
df45ac1bca
4
features.in/ntp/README
Normal file
4
features.in/ntp/README
Normal file
@ -0,0 +1,4 @@
|
||||
Эта фича конфигурирует службу NTP в качестве клиента
|
||||
с целью предоставления точного времени в составе LiveCD;
|
||||
для установленных систем рекомендуется применение модуля
|
||||
alterator-datetime.
|
8
features.in/ntp/config.mk
Normal file
8
features.in/ntp/config.mk
Normal 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)
|
10
features.in/ntp/rootfs/image-scripts.d/50-ntp
Executable file
10
features.in/ntp/rootfs/image-scripts.d/50-ntp
Executable 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:]]\+' ' '
|
Loading…
Reference in New Issue
Block a user