Commit graph

15 commits

Author SHA1 Message Date
Florian Eckert
86a2e8f671 ntpd: add config include support
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-14 14:04:25 +02:00
Sebastian Kemper
18335dc424 ntpd: create config_file directory
ntpd's configuration is stored in /var/etc, but the init script doesn't
create this directory. To be fair this folder is used by other packages
as well, for instance dnsmasq. Still, it's better not to rely on other
packages to create it.

Fixes: #10636

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-11-28 22:27:03 +01:00
Karl Palsson
c00c826789 ntpdate: use uci configured servers instead of static list
If we're going to have a list of ntp servers, we should at least respect
them.  Fallback to the original static list if no configured servers are
found.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-07-02 09:25:34 +00:00
Jeffery To
a214ce9f5b ntpd: Update init script
This replaces the use of uci_validate_section() with
uci_load_validate(), which removes the need to declare local variables
for every config option.

This also moves the generated config file to /var/etc and adds a
service_triggers() function.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-02-26 20:46:30 +01:00
Peter Wagner
c6035be89a ntpd: remove ntp.conf
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2018-01-02 15:38:07 +01:00
Peter Wagner
04654291a4 ntpd: *mimic the behaviour of the busybox ntpd's "-S" flag
*create a seperate line for every server, otherwise only the first listed server will be used
2018-01-02 15:19:23 +01:00
Philip Prindeville
f5ca3ea50f ntpd: use UCI to synthesize minimal conf file
Borrowed code from Busybox's sysntpd.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-07-27 17:47:27 -06:00
Peter Wagner
325bba7095 ntpd: restart instead of killall and start
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2017-03-06 09:44:57 +01:00
Peter Wagner
228764bfe8 ntpd: only restart ntpd when the wan interface comes up and ntpd is enabled
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2017-03-06 09:20:28 +01:00
Peter Wagner
fe80861f7c ntpd: cleanup Makefile and hotplug script
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2017-01-17 23:49:20 +01:00
Peter Wagner
d5b4f5bd72 ntpd: add hotplug script that signals when ntp reaches the stratum level like the sysntp implementation
use ntpq to check the status of the ntp server as all other status scripts included in the ntp tarball are
	based on perl which would dramatically increase the footprint of ntpd

Signed-off-by: Peter Wagner <tripolar@gmx.at>
2017-01-16 22:28:01 +01:00
Peter Wagner
0135d8e2bd ntpd: fix typo
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2015-04-13 18:53:17 +02:00
Peter Wagner
2c1c2de230 Currently the hotplug script never starts because it assumes the wrong
path to the binary. Fix the path.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2015-04-13 18:14:27 +02:00
John Crispin
d4042ec35e generic userid: use the new USERID api
recent changes in trunk allow us to specify the userid inside the openwrt makefile.
the info is stored int he meta data of the IPK contorl file and users are generated
by the new generic postinst trigger.

Signed-off-by: John Crispin <blogic@openwrt.org>
2014-10-08 03:45:30 +02:00
Peter Wagner
d5dd6b3c31 ntpd: import from packages
Signed-off-by: Peter Wagner <tripolar@gmx.at>
2014-06-16 11:54:42 +02:00