[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/08: services: openntpd: Remove useless let.
From: |
guix-commits |
Subject: |
06/08: services: openntpd: Remove useless let. |
Date: |
Sun, 8 Sep 2019 10:17:04 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit afd39a76e26a8ad6d77e65b7316b912fd8dbb623
Author: Maxim Cournoyer <address@hidden>
Date: Fri Sep 6 21:12:26 2019 +0900
services: openntpd: Remove useless let.
* gnu/services/networking.scm (openntpd-shepherd-service): Remove useless
let.
---
gnu/services/networking.scm | 68 ++++++++++++++++++++++-----------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index c45bfcd..dd2f9e2 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -508,41 +508,41 @@ make an initial adjustment of more than 1,000 seconds."
(match-record config <openntpd-configuration>
(openntpd listen-on query-from sensor server servers constraint-from
constraints-from allow-large-adjustment?)
- (let ()
- (define config
- (string-join
- (filter-map
- (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
- (map (cut string-append "constraints from \"" <> "\"\n")
- constraints-from))))
-
- (define ntpd.conf
- (plain-file "ntpd.conf" config))
- (list (shepherd-service
- (provision '(ntpd))
- (documentation "Run the Network Time Protocol (NTP) daemon.")
- (requirement '(user-processes networking))
- (start #~(make-forkexec-constructor
- (list (string-append #$openntpd "/sbin/ntpd")
- "-f" #$ntpd.conf
- "-d" ;; don't daemonize
- #$@(if allow-large-adjustment?
- '("-s")
- '()))
- ;; When ntpd is daemonized it repeatedly tries to
respawn
- ;; while running, leading shepherd to disable it. To
- ;; prevent spamming stderr, redirect output to
logfile.
- #:log-file "/var/log/ntpd"))
- (stop #~(make-kill-destructor)))))))
+ (define config
+ (string-join
+ (filter-map
+ (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
+ (map (cut string-append "constraints from \"" <> "\"\n")
+ constraints-from))))
+
+ (define ntpd.conf
+ (plain-file "ntpd.conf" config))
+
+ (list (shepherd-service
+ (provision '(ntpd))
+ (documentation "Run the Network Time Protocol (NTP) daemon.")
+ (requirement '(user-processes networking))
+ (start #~(make-forkexec-constructor
+ (list (string-append #$openntpd "/sbin/ntpd")
+ "-f" #$ntpd.conf
+ "-d" ;; don't daemonize
+ #$@(if allow-large-adjustment?
+ '("-s")
+ '()))
+ ;; When ntpd is daemonized it repeatedly tries to respawn
+ ;; while running, leading shepherd to disable it. To
+ ;; prevent spamming stderr, redirect output to logfile.
+ #:log-file "/var/log/ntpd"))
+ (stop #~(make-kill-destructor))))))
(define (openntpd-service-activation config)
"Return the activation gexp for CONFIG."
- branch master updated (861b9a3 -> ccdfae3), guix-commits, 2019/09/08
- 01/08: services: ntp: Allow large adjustment by default., guix-commits, 2019/09/08
- 02/08: services: ntp: Fix KOD warning., guix-commits, 2019/09/08
- 08/08: services: openntpd: Fix the config generation code., guix-commits, 2019/09/08
- 03/08: doc: Add index to find 'ntpd'., guix-commits, 2019/09/08
- 06/08: services: openntpd: Remove useless let.,
guix-commits <=
- 04/08: services: ntp: Support different NTP server types and options., guix-commits, 2019/09/08
- 07/08: services: openntpd: Add test for issue #3731., guix-commits, 2019/09/08
- 05/08: gnu: openntpd: Fix error CA errors when using constraints., guix-commits, 2019/09/08