mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
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 <ludo@gnu.org>
This commit is contained in:
parent
6a6b8a3fcf
commit
83460433b9
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue