mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services/udev: Allow configuring udev to run in debug mode.
* gnu/services/base.scm (<udev-configuration>): <debug?>: New field. * gnu/services/base.scm (udev-shepherd-service): Use it to add '--debug' to the command line, if applicable. * doc/guix.texi (Base Services): Document it. Change-Id: I88243fb4f321ff0876dd227e3c2b22082d37cfcf
This commit is contained in:
parent
8a103bc92f
commit
dd64f441d3
2 changed files with 16 additions and 6 deletions
|
@ -20188,17 +20188,20 @@ In an @code{operating-system} declaration, this service type can be
|
||||||
@deftp {Data Type} udev-configuration
|
@deftp {Data Type} udev-configuration
|
||||||
Data type representing the configuration of udev.
|
Data type representing the configuration of udev.
|
||||||
|
|
||||||
@table @asis
|
@table @code
|
||||||
@item @code{udev} (default: @code{eudev}) (type: file-like)
|
@item udev (default: @code{eudev}) (type: file-like)
|
||||||
Package object of the udev service. This package is used at run-time,
|
Package object of the udev service. This package is used at run-time,
|
||||||
when compiled for the target system. In order to generate the
|
when compiled for the target system. In order to generate the
|
||||||
@file{hwdb.bin} hardware index, it is also used when generating the
|
@file{hwdb.bin} hardware index, it is also used when generating the
|
||||||
system definition, compiled for the current system.
|
system definition, compiled for the current system.
|
||||||
|
|
||||||
@item @code{rules} (default: @var{'()}) (type: list-of-file-like)
|
@item debug? (default: @code{#f}) (type: boolean)
|
||||||
|
Whether to enable debug output.
|
||||||
|
|
||||||
|
@item rules (default: @code{'()}) (type: list-of-file-like)
|
||||||
List of file-like objects denoting udev rule files under a sub-directory.
|
List of file-like objects denoting udev rule files under a sub-directory.
|
||||||
|
|
||||||
@item @code{hardware} (default: @var{'()}) (type: list-of-file-like)
|
@item hardware (default: @code{'()}) (type: list-of-file-like)
|
||||||
List of file-like objects denoting udev hardware description files under
|
List of file-like objects denoting udev hardware description files under
|
||||||
a sub-directory.
|
a sub-directory.
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
|
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
|
||||||
;;; Copyright © 2021 qblade <qblade@protonmail.com>
|
;;; Copyright © 2021 qblade <qblade@protonmail.com>
|
||||||
;;; Copyright © 2021 Hui Lu <luhuins@163.com>
|
;;; Copyright © 2021 Hui Lu <luhuins@163.com>
|
||||||
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2021, 2025 muradm <mail@muradm.net>
|
;;; Copyright © 2021, 2025 muradm <mail@muradm.net>
|
||||||
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
|
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
|
||||||
|
@ -160,6 +160,8 @@
|
||||||
|
|
||||||
udev-configuration
|
udev-configuration
|
||||||
udev-configuration?
|
udev-configuration?
|
||||||
|
udev-configuration-udev
|
||||||
|
udev-configuration-debug?
|
||||||
udev-configuration-rules
|
udev-configuration-rules
|
||||||
udev-configuration-hardware
|
udev-configuration-hardware
|
||||||
udev-service-type
|
udev-service-type
|
||||||
|
@ -2410,6 +2412,8 @@ command that allows you to share pre-built binaries with others over HTTP.")))
|
||||||
udev-configuration?
|
udev-configuration?
|
||||||
(udev udev-configuration-udev ;file-like
|
(udev udev-configuration-udev ;file-like
|
||||||
(default eudev))
|
(default eudev))
|
||||||
|
(debug? udev-configuration-debug? ;boolean
|
||||||
|
(default #f))
|
||||||
(rules udev-configuration-rules ;list of file-like
|
(rules udev-configuration-rules ;list of file-like
|
||||||
(default '()))
|
(default '()))
|
||||||
(hardware udev-configuration-hardware ;list of file-like
|
(hardware udev-configuration-hardware ;list of file-like
|
||||||
|
@ -2552,7 +2556,10 @@ item of PACKAGES."
|
||||||
(umask old-umask))
|
(umask old-umask))
|
||||||
|
|
||||||
(let ((pid (fork+exec-command
|
(let ((pid (fork+exec-command
|
||||||
(list udevd)
|
`(,udevd
|
||||||
|
,@(if #$(udev-configuration-debug? config)
|
||||||
|
'("--debug")
|
||||||
|
'()))
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(cons*
|
(cons*
|
||||||
;; The first one is for udev, the second one for
|
;; The first one is for udev, the second one for
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue