summaryrefslogtreecommitdiff
path: root/package/utils
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-03-06 23:20:37 +0100
committerPiotr Dymacz <pepe2k@gmail.com>2017-03-15 23:05:00 +0100
commit6e44f47a90c1971aa3582a1e764746c43177401b (patch)
tree7d66d6cf6b649bb0837cd36285efb8b188cd6f26 /package/utils
parente1f3cf7ede923312a09fd37195b059a31072cd52 (diff)
downloadmtk-20170518-6e44f47a90c1971aa3582a1e764746c43177401b.zip
mtk-20170518-6e44f47a90c1971aa3582a1e764746c43177401b.tar.gz
mtk-20170518-6e44f47a90c1971aa3582a1e764746c43177401b.tar.bz2
sysntpd: restore support for peer-less (standalone) mode
ntpd from Busybox supports peer-less (standalone) mode when it's started with option -l and without any peer provided with option -p. In this mode ntpd uses local time as reference and acts as stratum 1 server. This mode can be used in isolated networks, where Internet access and/or other NTP server/s are not available, but the device has some other way of getting correct time, like e.g. GPS (ugps supports setting local time by default). Support for this mode was incorrectly disabled/removed in: 1527f96ca6e196fa17c96fdb3ae520158fa5943f Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/utils')
-rwxr-xr-xpackage/utils/busybox/files/sysntpd2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
index 98260be..e693e40 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -45,7 +45,7 @@ start_service() {
[ $use_dhcp = 1 ] && get_dhcp_ntp_servers "$dhcp_interface"
- [ -z "$server" ] && return
+ [ -z "$server" -a "$enable_server" = "0" ] && return
procd_open_instance
procd_set_param command "$PROG" -n -N