Skip to content
Snippets Groups Projects
Commit d096f530 authored by Lejla Murselovic's avatar Lejla Murselovic Committed by Sukru Senli
Browse files

ntpd: add support for configuring minpoll and maxpoll via uci

parent afead603
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,8 @@ validate_ntp_section() { ...@@ -22,7 +22,8 @@ validate_ntp_section() {
uci_load_validate system timeserver "$1" "$2" \ uci_load_validate system timeserver "$1" "$2" \
'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' \ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' \
'pool:list(host)' \ 'pool:list(host)' \
'interface:list(string)' 'interface:list(string)' \
'maxpoll:uinteger' 'minpoll:uinteger'
} }
start_ntpd_instance() { start_ntpd_instance() {
...@@ -73,7 +74,10 @@ start_ntpd_instance() { ...@@ -73,7 +74,10 @@ start_ntpd_instance() {
for i in $server for i in $server
do do
emit "server $i iburst" str="server $i iburst"
[ -n "$minpoll" ] && str="${str} minpoll $minpoll"
[ -n "$maxpoll" ] && str="${str} maxpoll $maxpoll"
emit "${str}"
done done
for i in $pool for i in $pool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment