guix-commits
[Top][All Lists]
Advanced

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

02/02: services: base: Use make-static-device-nodes.


From: Danny Milosavljevic
Subject: 02/02: services: base: Use make-static-device-nodes.
Date: Sat, 16 Dec 2017 01:33:41 -0500 (EST)

dannym pushed a commit to branch master
in repository guix.

commit 86e6b4c93104e2f83429b9e12f15ed62341289b4
Author: Danny Milosavljevic <address@hidden>
Date:   Sat Dec 16 00:17:03 2017 +0100

    services: base: Use make-static-device-nodes.
    
    Fixes <https://bugs.gnu.org/22050>.
    
    * gnu/services/base.scm (udev-shepherd-service): Use 
make-static-device-nodes.
---
 gnu/services/base.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 291dd63..5e08927 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1727,6 +1727,17 @@ item of @var{packages}."
                     (setenv "EUDEV_RULES_DIRECTORY"
                             #$(file-append rules "/lib/udev/rules.d"))
 
+                    (let* ((kernel-release
+                            (utsname:release (uname)))
+                           (linux-module-directory
+                            (getenv "LINUX_MODULE_DIRECTORY"))
+                           (directory
+                            (string-append linux-module-directory "/"
+                                           kernel-release))
+                           (old-umask (umask #o022)))
+                      (make-static-device-nodes directory)
+                      (umask old-umask))
+
                     (let ((pid (primitive-fork)))
                       (case pid
                         ((0)
@@ -1750,7 +1761,10 @@ item of @var{packages}."
          ;; When halting the system, 'udev' is actually killed by
          ;; 'user-processes', i.e., before its own 'stop' method was called.
          ;; Thus, make sure it is not respawned.
-         (respawn? #f)))))))
+         (respawn? #f)
+         ;; We need additional modules.
+         (modules `((gnu build linux-boot)
+                    ,@%default-modules))))))))
 
 (define udev-service-type
   (service-type (name 'udev)



reply via email to

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