services: connman: Redirect output to a log file.
authorLudovic Courtès <ludo@gnu.org>
Tue, 23 Apr 2019 21:41:35 +0000 (23:41 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 23 Apr 2019 21:44:36 +0000 (23:44 +0200)
* gnu/services/networking.scm (connman-shepherd-service): Pass
 #:log-file to 'make-forkexec-constructor'.

gnu/services/networking.scm

index 61561a4..03b2c6e 100644 (file)
@@ -985,7 +985,14 @@ wireless networking."))))
                       (list (string-append #$connman
                                            "/sbin/connmand")
                             "-n" "-r"
-                            #$@(if disable-vpn? '("--noplugin=vpn") '()))))
+                            #$@(if disable-vpn? '("--noplugin=vpn") '()))
+
+                      ;; As connman(8) notes, when passing '-n', connman
+                      ;; "directs log output to the controlling terminal in
+                      ;; addition to syslog."  Redirect stdout and stderr
+                      ;; to avoid spamming the console (XXX: for some reason
+                      ;; redirecting to /dev/null doesn't work.)
+                      #:log-file "/var/log/connman.log"))
             (stop #~(make-kill-destructor)))))))
 
 (define connman-service-type