mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: udev: Make sure modules are found, and use "udevadm settle".
* gnu/services/base.scm (udev-service): Set $LINUX_MODULE_DIRECTORY. In the parent, invoke "udevadm settle" before "udevadm trigger".
This commit is contained in:
parent
62f0a4792b
commit
081c5b2d66
1 changed files with 7 additions and 0 deletions
|
@ -409,6 +409,10 @@ (define* (udev-service #:key (udev udev))
|
|||
(requirement '(root-file-system))
|
||||
(documentation "Populate the /dev directory.")
|
||||
(start #~(lambda ()
|
||||
;; Allow udev to find the modules.
|
||||
(setenv "LINUX_MODULE_DIRECTORY"
|
||||
"/run/booted-system/kernel/lib/modules")
|
||||
|
||||
(let ((pid (primitive-fork)))
|
||||
(case pid
|
||||
((0)
|
||||
|
@ -421,6 +425,9 @@ (define* (udev-service #:key (udev udev))
|
|||
(execl (string-append #$udev "/libexec/udev/udevd")
|
||||
"udevd"))
|
||||
(else
|
||||
;; Wait for things to settle down.
|
||||
(system* (string-append #$udev "/bin/udevadm")
|
||||
"settle")
|
||||
;; Create a bunch of devices.
|
||||
(system* (string-append #$udev "/bin/udevadm")
|
||||
"trigger")
|
||||
|
|
Loading…
Reference in a new issue