[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: activation: Check whether /proc/sys/kernel/modprobe exists.
From: |
guix-commits |
Subject: |
06/06: activation: Check whether /proc/sys/kernel/modprobe exists. |
Date: |
Mon, 6 Jan 2020 10:32:17 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 83460433b94487198750ad0bcc6f3869f68a8c8f
Author: address@hidden <address@hidden>
AuthorDate: Thu Jan 2 15:13:45 2020 +0300
activation: Check whether /proc/sys/kernel/modprobe exists.
* gnu/build/activation.scm (activate-modprobe): Check whether
/proc/sys/kernel/modprobe exists before writing to it.
Co-authored-by: Ludovic Courtès <address@hidden>
---
gnu/build/activation.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 6d69628..30f5e87 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -281,9 +281,13 @@ second element is the name it should appear at, such as:
(define (activate-modprobe modprobe)
"Tell the kernel to use MODPROBE to load modules."
- (call-with-output-file "/proc/sys/kernel/modprobe"
- (lambda (port)
- (display modprobe port))))
+
+ ;; If the kernel was built without loadable module support, this file is
+ ;; unavailable, so check for its existence first.
+ (when (file-exists? "/proc/sys/kernel/modprobe")
+ (call-with-output-file "/proc/sys/kernel/modprobe"
+ (lambda (port)
+ (display modprobe port)))))
(define (activate-firmware directory)
"Tell the kernel to look for device firmware under DIRECTORY. This
- branch master updated (3a695c0 -> 8346043), guix-commits, 2020/01/06
- 03/06: gnu: ibus-rime: Record the right file name in "rime.xml"., guix-commits, 2020/01/06
- 04/06: gnu: gnome-characters: Wrap program to provide the necessary Typelib files., guix-commits, 2020/01/06
- 06/06: activation: Check whether /proc/sys/kernel/modprobe exists.,
guix-commits <=
- 01/06: gnu: guix: Ensure the bootstrap binary tarballs aren't GC'd., guix-commits, 2020/01/06
- 05/06: gnu: python-py3status: Fix patch of file path, guix-commits, 2020/01/06
- 02/06: Adjust module autoloads., guix-commits, 2020/01/06