diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-13 10:53:47 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-13 10:53:47 +0200 |
commit | 66a99a06761b2cf0aa3fa6d70e97e767ab237fcb (patch) | |
tree | 3c362e65c58728e8c434182801f85fcce63d09e8 /gnu | |
parent | ba544e78dc22a3fa8e5aaa9dc25bd95ab50e677c (diff) | |
download | gnu-guix-66a99a06761b2cf0aa3fa6d70e97e767ab237fcb.tar gnu-guix-66a99a06761b2cf0aa3fa6d70e97e767ab237fcb.tar.gz |
services: udev: Allow the use of eudev.
* gnu/services/base.scm (udev-service): Adjust 'start' method to support
eudev in addition to udev.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/base.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2ff89a575f..320a58697d 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -527,8 +527,16 @@ extra rules from the packages listed in @var{rules}." (documentation "Populate the /dev directory, dynamically.") (start #~(lambda () + (define find + (@ (srfi srfi-1) find)) + (define udevd - (string-append #$udev "/libexec/udev/udevd")) + ;; Choose the right 'udevd'. + (find file-exists? + (map (lambda (suffix) + (string-append #$udev suffix)) + '("/libexec/udev/udevd" ;udev + "/sbin/udevd")))) ;eudev (define (wait-for-udevd) ;; Wait until someone's listening on udevd's control @@ -548,7 +556,9 @@ extra rules from the packages listed in @var{rules}." (setenv "LINUX_MODULE_DIRECTORY" "/run/booted-system/kernel/lib/modules") + ;; The first one is for udev, the second one for eudev. (setenv "UDEV_CONFIG_FILE" #$udev.conf) + (setenv "EUDEV_RULES_DIRECTORY" #$rules) (let ((pid (primitive-fork))) (case pid |