aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-26 22:58:23 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-26 23:40:37 +0200
commit23784f0c3342a0fab5bf2a1c15c300b9f0856872 (patch)
tree5a6a549445ba331eee83b84b3b944a623995c916 /gnu/services
parenta56c4eb8f43ae5555985d8a84308d150c0763c5a (diff)
downloadgnu-guix-23784f0c3342a0fab5bf2a1c15c300b9f0856872.tar
gnu-guix-23784f0c3342a0fab5bf2a1c15c300b9f0856872.tar.gz
services: udev: Don't attempt to read "modules.devname" from a container.
Fixes <https://bugs.gnu.org/32814>. Reported by Julien Lepiller <julien@lepiller.eu>. * gnu/services/base.scm (udev-shepherd-service)[start]: Check whether DIRECTORY exists and skip 'make-static-device-nodes' call if it doesn't.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm7
1 files changed, 6 insertions, 1 deletions
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 @@ 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))))