services: openntpd: Remove useless let.
* gnu/services/networking.scm (openntpd-shepherd-service): Remove useless let.
This commit is contained in:
parent
f92cf9d356
commit
afd39a76e2
|
@ -508,41 +508,41 @@ make an initial adjustment of more than 1,000 seconds."
|
||||||
(match-record config <openntpd-configuration>
|
(match-record config <openntpd-configuration>
|
||||||
(openntpd listen-on query-from sensor server servers constraint-from
|
(openntpd listen-on query-from sensor server servers constraint-from
|
||||||
constraints-from allow-large-adjustment?)
|
constraints-from allow-large-adjustment?)
|
||||||
(let ()
|
|
||||||
(define config
|
(define config
|
||||||
(string-join
|
(string-join
|
||||||
(filter-map
|
(filter-map
|
||||||
(lambda (field value)
|
(lambda (field value)
|
||||||
(string-join
|
|
||||||
(map (cut string-append field <> "\n")
|
|
||||||
value)))
|
|
||||||
'("listen on " "query from " "sensor " "server " "servers "
|
|
||||||
"constraint from ")
|
|
||||||
(list listen-on query-from sensor server servers constraint-from))
|
|
||||||
;; The 'constraints from' field needs to be enclosed in double quotes.
|
|
||||||
(string-join
|
(string-join
|
||||||
(map (cut string-append "constraints from \"" <> "\"\n")
|
(map (cut string-append field <> "\n")
|
||||||
constraints-from))))
|
value)))
|
||||||
|
'("listen on " "query from " "sensor " "server " "servers "
|
||||||
|
"constraint from ")
|
||||||
|
(list listen-on query-from sensor server servers constraint-from))
|
||||||
|
;; The 'constraints from' field needs to be enclosed in double quotes.
|
||||||
|
(string-join
|
||||||
|
(map (cut string-append "constraints from \"" <> "\"\n")
|
||||||
|
constraints-from))))
|
||||||
|
|
||||||
(define ntpd.conf
|
(define ntpd.conf
|
||||||
(plain-file "ntpd.conf" config))
|
(plain-file "ntpd.conf" config))
|
||||||
|
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision '(ntpd))
|
(provision '(ntpd))
|
||||||
(documentation "Run the Network Time Protocol (NTP) daemon.")
|
(documentation "Run the Network Time Protocol (NTP) daemon.")
|
||||||
(requirement '(user-processes networking))
|
(requirement '(user-processes networking))
|
||||||
(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?
|
#$@(if allow-large-adjustment?
|
||||||
'("-s")
|
'("-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.
|
||||||
#:log-file "/var/log/ntpd"))
|
#:log-file "/var/log/ntpd"))
|
||||||
(stop #~(make-kill-destructor)))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define (openntpd-service-activation config)
|
(define (openntpd-service-activation config)
|
||||||
"Return the activation gexp for CONFIG."
|
"Return the activation gexp for CONFIG."
|
||||||
|
|
Loading…
Reference in New Issue