From 081c5b2d66b6f9bdd1b966a96640b7ec4df8d5a6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 29 Jun 2014 22:06:29 +0200 Subject: 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". --- gnu/services/base.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 0df4f652da..bab07aa4b7 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -409,6 +409,10 @@ hydra.gnu.org are used by default." (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 @@ hydra.gnu.org are used by default." (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") -- cgit v1.2.3