guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/08: services: udev: Don't attempt to read "modules.devname" from a co


From: Ludovic Courtès
Subject: 06/08: services: udev: Don't attempt to read "modules.devname" from a container.
Date: Wed, 26 Sep 2018 17:40:47 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 23784f0c3342a0fab5bf2a1c15c300b9f0856872
Author: Ludovic Courtès <address@hidden>
Date:   Wed Sep 26 22:58:23 2018 +0200

    services: udev: Don't attempt to read "modules.devname" from a container.
    
    Fixes <https://bugs.gnu.org/32814>.
    Reported by Julien Lepiller <address@hidden>.
    
    * 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 5ba2c6b..9dfabd9 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1881,7 +1881,12 @@ item of @var{packages}."
                             (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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]