aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/busybox/files')
-rwxr-xr-xpackage/utils/busybox/files/sysntpd6
1 files changed, 4 insertions, 2 deletions
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