Author: blogic
Date: 2014-06-27 09:55:03 +0200 (Fri, 27 Jun 2014)
New Revision: 41355

Modified:
   trunk/package/utils/busybox/Makefile
   trunk/package/utils/busybox/files/sysntpd
Log:
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 <[email protected]>

Modified: trunk/package/utils/busybox/Makefile
===================================================================
--- trunk/package/utils/busybox/Makefile        2014-06-27 07:52:06 UTC (rev 
41354)
+++ trunk/package/utils/busybox/Makefile        2014-06-27 07:55:03 UTC (rev 
41355)
@@ -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 @@
 
 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

Modified: trunk/package/utils/busybox/files/sysntpd
===================================================================
--- trunk/package/utils/busybox/files/sysntpd   2014-06-27 07:52:06 UTC (rev 
41354)
+++ trunk/package/utils/busybox/files/sysntpd   2014-06-27 07:55:03 UTC (rev 
41355)
@@ -8,17 +8,19 @@
 
 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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to