mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -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))
|
(requirement '(root-file-system))
|
||||||
(documentation "Populate the /dev directory.")
|
(documentation "Populate the /dev directory.")
|
||||||
(start #~(lambda ()
|
(start #~(lambda ()
|
||||||
|
;; Allow udev to find the modules.
|
||||||
|
(setenv "LINUX_MODULE_DIRECTORY"
|
||||||
|
"/run/booted-system/kernel/lib/modules")
|
||||||
|
|
||||||
(let ((pid (primitive-fork)))
|
(let ((pid (primitive-fork)))
|
||||||
(case pid
|
(case pid
|
||||||
((0)
|
((0)
|
||||||
|
@ -421,6 +425,9 @@ (define* (udev-service #:key (udev udev))
|
||||||
(execl (string-append #$udev "/libexec/udev/udevd")
|
(execl (string-append #$udev "/libexec/udev/udevd")
|
||||||
"udevd"))
|
"udevd"))
|
||||||
(else
|
(else
|
||||||
|
;; Wait for things to settle down.
|
||||||
|
(system* (string-append #$udev "/bin/udevadm")
|
||||||
|
"settle")
|
||||||
;; Create a bunch of devices.
|
;; Create a bunch of devices.
|
||||||
(system* (string-append #$udev "/bin/udevadm")
|
(system* (string-append #$udev "/bin/udevadm")
|
||||||
"trigger")
|
"trigger")
|
||||||
|
|
Loading…
Reference in a new issue