diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
commit | 6985a1acb3e9cc4cad8b6f63d77154842d25c929 (patch) | |
tree | 4df49b9f438e0e466efb3d589027a62b39d49761 /gnu/services/linux.scm | |
parent | 87eaa4207208e16e5e1b22b60ba4ff5c3d035023 (diff) | |
parent | d0fff8f840afc17be40bdc49bff52ed08d5a1a7b (diff) | |
download | guix-patches-6985a1acb3e9cc4cad8b6f63d77154842d25c929.tar guix-patches-6985a1acb3e9cc4cad8b6f63d77154842d25c929.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/services/linux.scm')
-rw-r--r-- | gnu/services/linux.scm | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index 72c7779596..1046a7e0c2 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -147,35 +147,34 @@ representation." (define kernel-module-loader-shepherd-service (match-lambda ((and (? list? kernel-modules) ((? string?) ...)) - (list - (shepherd-service - (documentation "Load kernel modules.") - (provision '(kernel-module-loader)) - (requirement '(file-systems)) - (one-shot? #t) - (modules `((srfi srfi-1) - (srfi srfi-34) - (srfi srfi-35) - (rnrs io ports) - ,@%default-modules)) - (start - #~(lambda _ - (cond - ((null? '#$kernel-modules) #t) - ((file-exists? "/proc/sys/kernel/modprobe") - (let ((modprobe (call-with-input-file - "/proc/sys/kernel/modprobe" get-line))) - (guard (c ((message-condition? c) - (format (current-error-port) "~a~%" - (condition-message c)) - #f)) - (every (lambda (module) - (invoke/quiet modprobe "--" module)) - '#$kernel-modules)))) - (else - (format (current-error-port) "error: ~a~%" - "Kernel is missing loadable module support.") - #f))))))))) + (shepherd-service + (documentation "Load kernel modules.") + (provision '(kernel-module-loader)) + (requirement '(file-systems)) + (one-shot? #t) + (modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules)) + (start + #~(lambda _ + (cond + ((null? '#$kernel-modules) #t) + ((file-exists? "/proc/sys/kernel/modprobe") + (let ((modprobe (call-with-input-file + "/proc/sys/kernel/modprobe" get-line))) + (guard (c ((message-condition? c) + (format (current-error-port) "~a~%" + (condition-message c)) + #f)) + (every (lambda (module) + (invoke/quiet modprobe "--" module)) + '#$kernel-modules)))) + (else + (format (current-error-port) "error: ~a~%" + "Kernel is missing loadable module support.") + #f)))))))) (define kernel-module-loader-service-type (service-type @@ -183,7 +182,7 @@ representation." (description "Load kernel modules.") (extensions (list (service-extension shepherd-root-service-type - kernel-module-loader-shepherd-service))) + (compose list kernel-module-loader-shepherd-service)))) (compose concatenate) (extend append) (default-value '()))) |