From 23784f0c3342a0fab5bf2a1c15c300b9f0856872 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 26 Sep 2018 22:58:23 +0200 Subject: services: udev: Don't attempt to read "modules.devname" from a container. Fixes . Reported by Julien Lepiller . * gnu/services/base.scm (udev-shepherd-service)[start]: Check whether DIRECTORY exists and skip 'make-static-device-nodes' call if it doesn't. --- gnu/services/base.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 5ba2c6b86d..9dfabd9807 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1881,7 +1881,12 @@ (define (wait-for-udevd) (string-append linux-module-directory "/" kernel-release)) (old-umask (umask #o022))) - (make-static-device-nodes directory) + ;; If we're in a container, DIRECTORY might not exist, + ;; for instance because the host runs a different + ;; kernel. In that case, skip it; we'll just miss a few + ;; nodes like /dev/fuse. + (when (file-exists? directory) + (make-static-device-nodes directory)) (umask old-umask)) (let ((pid (fork+exec-command (list udevd)))) -- cgit v1.2.3