services: openntpd: Remove support for deprecated "-s" option.
* gnu/services/networking.scm (openntpd-configuration): Remove "allow-large-adjustment?" field. (openntpd-shepherd-service): Remove use of "allow-large-adjustment?" configuration field and "-s" daemon option. * tests/networking.scm (%openntpd-conf-sample): Remove "allow-large-adjustment?" field. * doc/guix.texi (Networking Services)[openntpd-service-type]: Remove "allow-large-adjustment?" field from sample configuration. [openntpd-configuration]: Remove description of "allow-large-adjustment?" field. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
fb3c0d3444
commit
181f290aa2
|
@ -16246,8 +16246,7 @@ clock synchronized with that of the given servers.
|
||||||
(listen-on '("127.0.0.1" "::1"))
|
(listen-on '("127.0.0.1" "::1"))
|
||||||
(sensor '("udcf0 correction 70000"))
|
(sensor '("udcf0 correction 70000"))
|
||||||
(constraint-from '("www.gnu.org"))
|
(constraint-from '("www.gnu.org"))
|
||||||
(constraints-from '("https://www.google.com/"))
|
(constraints-from '("https://www.google.com/"))))
|
||||||
(allow-large-adjustment? #t)))
|
|
||||||
|
|
||||||
@end lisp
|
@end lisp
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -16285,9 +16284,6 @@ a constraint.
|
||||||
As with constraint from, specify a list of URLs, IP addresses or hostnames of
|
As with constraint from, specify a list of URLs, IP addresses or hostnames of
|
||||||
HTTPS servers to provide a constraint. Should the hostname resolve to multiple
|
HTTPS servers to provide a constraint. Should the hostname resolve to multiple
|
||||||
IP addresses, @code{ntpd} will calculate a median constraint from all of them.
|
IP addresses, @code{ntpd} will calculate a median constraint from all of them.
|
||||||
@item @code{allow-large-adjustment?} (default: @code{#f})
|
|
||||||
Determines if @code{ntpd} is allowed to make an initial adjustment of more
|
|
||||||
than 180 seconds.
|
|
||||||
@end table
|
@end table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -560,9 +560,7 @@ make an initial adjustment of more than 1,000 seconds."
|
||||||
(constraint-from openntpd-constraint-from
|
(constraint-from openntpd-constraint-from
|
||||||
(default '()))
|
(default '()))
|
||||||
(constraints-from openntpd-constraints-from
|
(constraints-from openntpd-constraints-from
|
||||||
(default '()))
|
(default '())))
|
||||||
(allow-large-adjustment? openntpd-allow-large-adjustment?
|
|
||||||
(default #f))) ; upstream default
|
|
||||||
|
|
||||||
(define (openntpd-configuration->string config)
|
(define (openntpd-configuration->string config)
|
||||||
|
|
||||||
|
@ -594,8 +592,7 @@ make an initial adjustment of more than 1,000 seconds."
|
||||||
"\n"))) ;add a trailing newline
|
"\n"))) ;add a trailing newline
|
||||||
|
|
||||||
(define (openntpd-shepherd-service config)
|
(define (openntpd-shepherd-service config)
|
||||||
(let ((openntpd (openntpd-configuration-openntpd config))
|
(let ((openntpd (openntpd-configuration-openntpd config)))
|
||||||
(allow-large-adjustment? (openntpd-allow-large-adjustment? config)))
|
|
||||||
|
|
||||||
(define ntpd.conf
|
(define ntpd.conf
|
||||||
(plain-file "ntpd.conf" (openntpd-configuration->string config)))
|
(plain-file "ntpd.conf" (openntpd-configuration->string config)))
|
||||||
|
@ -607,10 +604,7 @@ make an initial adjustment of more than 1,000 seconds."
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list (string-append #$openntpd "/sbin/ntpd")
|
(list (string-append #$openntpd "/sbin/ntpd")
|
||||||
"-f" #$ntpd.conf
|
"-f" #$ntpd.conf
|
||||||
"-d" ;; don't daemonize
|
"-d") ;; don't daemonize
|
||||||
#$@(if allow-large-adjustment?
|
|
||||||
'("-s")
|
|
||||||
'()))
|
|
||||||
;; When ntpd is daemonized it repeatedly tries to respawn
|
;; When ntpd is daemonized it repeatedly tries to respawn
|
||||||
;; while running, leading shepherd to disable it. To
|
;; while running, leading shepherd to disable it. To
|
||||||
;; prevent spamming stderr, redirect output to logfile.
|
;; prevent spamming stderr, redirect output to logfile.
|
||||||
|
|
|
@ -68,8 +68,7 @@
|
||||||
(listen-on '("127.0.0.1" "::1"))
|
(listen-on '("127.0.0.1" "::1"))
|
||||||
(sensor '("udcf0 correction 70000"))
|
(sensor '("udcf0 correction 70000"))
|
||||||
(constraint-from '("www.gnu.org"))
|
(constraint-from '("www.gnu.org"))
|
||||||
(constraints-from '("https://www.google.com/"))
|
(constraints-from '("https://www.google.com/"))))
|
||||||
(allow-large-adjustment? #t)))
|
|
||||||
|
|
||||||
(test-assert "openntpd configuration generation sanity check"
|
(test-assert "openntpd configuration generation sanity check"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue