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.master
parent
a56c4eb8f4
commit
23784f0c33
|
@ -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))))
|
||||
|
|
Reference in New Issue