summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-03-07 12:44:02 +0000
committerLudovic Courtès <ludo@gnu.org>2023-03-10 14:49:57 +0100
commit17c80118fa2a78a249f7fb992ffa3e31407a24a7 (patch)
tree28b1189e4bf2c8fb1386e2c18b500ade49560265 /gnu/services
parent269871d18e7d1a95fbe5dfa7360208110dde9163 (diff)
services: connman: Deprecate 'iwd?' field.
* gnu/services/networking.scm (<connman-configuration>) [iwd?]: Use helper to warn deprecated field. (connman-shepherd-service): Make iwd? a local variable independent from the deprecated field. * doc/guix.texi (Networking Setup): Remove mention of iwd? field. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/networking.scm50
1 files changed, 28 insertions, 22 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 6a09f6e728..0ed467f9d8 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1294,7 +1294,8 @@ wireless networking."))))
(disable-vpn? connman-configuration-disable-vpn?
(default #f))
(iwd? connman-configuration-iwd?
- (default #f)))
+ (default #f)
+ (sanitize warn-iwd?-field-deprecation)))
(define (connman-activation config)
(let ((disable-vpn? (connman-configuration-disable-vpn? config)))
@@ -1308,27 +1309,32 @@ wireless networking."))))
(define (connman-shepherd-service config)
(match-record config <connman-configuration> (connman shepherd-requirement
disable-vpn? iwd?)
- (list (shepherd-service
- (documentation "Run Connman")
- (provision '(networking))
- (requirement `(user-processes dbus-system loopback
- ,@shepherd-requirement
- ,@(if iwd? '(iwd) '())))
- (start #~(make-forkexec-constructor
- (list (string-append #$connman
- "/sbin/connmand")
- "--nodaemon"
- "--nodnsproxy"
- #$@(if disable-vpn? '("--noplugin=vpn") '())
- #$@(if iwd? '("--wifi=iwd_agent") '()))
-
- ;; 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))))))
+ (let ((iwd? (or iwd? ; TODO: deprecated field, remove later.
+ (and shepherd-requirement
+ (memq 'iwd shepherd-requirement)))))
+ (list (shepherd-service
+ (documentation "Run Connman")
+ (provision '(networking))
+ (requirement `(user-processes dbus-system loopback
+ ,@shepherd-requirement
+ ;; TODO: iwd? is deprecated and should be passed
+ ;; with shepherd-requirement, remove later.
+ ,@(if iwd? '(iwd) '())))
+ (start #~(make-forkexec-constructor
+ (list (string-append #$connman
+ "/sbin/connmand")
+ "--nodaemon"
+ "--nodnsproxy"
+ #$@(if disable-vpn? '("--noplugin=vpn") '())
+ #$@(if iwd? '("--wifi=iwd_agent") '()))
+
+ ;; 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-log-rotation
(list (log-rotation