aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-27 07:55:03 +0000
committerJohn Crispin <blogic@openwrt.org>2014-06-27 07:55:03 +0000
commit2c46cfb66b26f798aeef777adaa81b8708b4214d (patch)
tree47425149200f4114a52b50ed4fa797a833c1443a /package/utils/busybox
parent284bbce0812d2776bf3f640ae05bbebffceaf464 (diff)
downloadupstream-2c46cfb66b26f798aeef777adaa81b8708b4214d.tar.gz
upstream-2c46cfb66b26f798aeef777adaa81b8708b4214d.tar.bz2
upstream-2c46cfb66b26f798aeef777adaa81b8708b4214d.zip
busybox: use ntp enabled config option
Even if enabled option is missing from ntp configuration we are still keeping default behavior. Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41355 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils/busybox')
-rw-r--r--package/utils/busybox/Makefile4
-rwxr-xr-xpackage/utils/busybox/files/sysntpd6
2 files changed, 6 insertions, 4 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 6dbd54d746..143ad46b53 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.22.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
index c5c3c8e59a..417addfb1c 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -8,17 +8,19 @@ PROG=/usr/sbin/ntpd
validate_ntp_section() {
uci_validate_section system timeserver "${1}" \
- 'server:list(host)' 'enable_server:bool:0'
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
}
start_service() {
- local server enable_server peer
+ local server enabled enable_server peer
validate_ntp_section ntp || {
echo "validation failed"
return 1
}
+ [ $enabled = 0 ] && return
+
[ -z "$server" ] && return
procd_open_instance